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


MySQL TUTORIALS » Date Time Functions » SEC_TO_TIME »

 

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


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          |
+-------------------+
row in set (0.00 sec)

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

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» SEC_TO_TIME