SEC_TO_TIME
Convert seconds to time. This function returns a TIME value corresponding to the number of seconds elapsed from the start of the day.
Syntax
SEC_TO_TIME(seconds)Description
Examples
SELECT SEC_TO_TIME(12414);
+--------------------+
| SEC_TO_TIME(12414) |
+--------------------+
| 03:26:54 |
+--------------------+
SELECT SEC_TO_TIME(12414)+0;
+----------------------+
| SEC_TO_TIME(12414)+0 |
+----------------------+
| 32654 |
+----------------------+
SELECT SEC_TO_TIME(9999999);
+----------------------+
| SEC_TO_TIME(9999999) |
+----------------------+
| 838:59:59 |
+----------------------+
1 row in set, 1 warning (0.00 sec)
SHOW WARNINGS;
+---------+------+-------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------+
| Warning | 1292 | Truncated incorrect time value: '9999999' |
+---------+------+-------------------------------------------+Last updated
Was this helpful?

