Description
The SEC_TO_TIME( ) function returns the seconds argument, which is converted to hours, minutes, and seconds, as a time value.
This function has the form:
SELECT SEC_TO_TIME(seconds)
Parameter | Description |
---|---|
seconds | Seconds are entered in numbers |
Return Value
The seconds argument, which is converted to hours, minutes, and seconds, as a time value.
Examples
The following example shows the basic use of this function:
mysql> SELECT SEC_TO_TIME(2378);
-> '00:39:38'
mysql> SELECT SEC_TO_TIME(2378) + 0;
-> 3938