SEC_TO_TIME(seconds) returns the seconds argument, converted to hours, minutes, and seconds. : SEC_TO_TIME « Date Time Functions « MySQL Tutorial






The returning value is in the format of 'HH:MM:SS' or HHMMSS format, depending on whether the function is used in a string or numeric context.

mysql>
mysql> SELECT SEC_TO_TIME(1378);
+-------------------+
| SEC_TO_TIME(1378) |
+-------------------+
| 00:22:58          |
+-------------------+
1 row in set (0.00 sec)

mysql>
mysql> SELECT SEC_TO_TIME(2478) + 0;
+-----------------------+
| SEC_TO_TIME(2478) + 0 |
+-----------------------+
|           4118.000000 |
+-----------------------+
1 row in set (0.00 sec)

mysql>








14.37.SEC_TO_TIME
14.37.1.SEC_TO_TIME(seconds) returns the seconds argument, converted to hours, minutes, and seconds.