Home »
MySQL »
MySQL date/time Functions
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);
MySQL SEC_TO_TIME() Function Example 2
SELECT SEC_TO_TIME(67969);
MySQL SEC_TO_TIME() Function Example 3
SELECT SEC_TO_TIME(78621);