MySQL SEC_TO_TIME() Function

MySQL | SEC_TO_TIME() Function: Learn about the SEC_TO_TIME() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 11, 2022

SEC_TO_TIME() Function

As the name suggests, the SEC_TO_TIME() function is used to convert the given seconds to the time.

SEC_TO_TIME() Syntax

SELECT SEC_TO_TIME(seconds value);

SEC_TO_TIME() Parameter(s)

This function takes one parameter and that is the number of seconds.

SEC_TO_TIME() Return Value

This function will return the time after converting it from the seconds.

MySQL SEC_TO_TIME() Function Example 1

SELECT SEC_TO_TIME(3987);
Example 1: MySQL SEC_TO_TIME() Function

MySQL SEC_TO_TIME() Function Example 2

SELECT SEC_TO_TIME(67969);
Example 2: MySQL SEC_TO_TIME() Function

MySQL SEC_TO_TIME() Function Example 3

SELECT SEC_TO_TIME(78621);
Example 3: MySQL SEC_TO_TIME() Function



Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.