Syntax
TIME_FORMAT(time,format)
Purpose
TIME_FORMAT() can be used like DATE_FORMAT(), except that format can contain format specifiers only for hours, minutes, seconds, and microseconds.
If the value of time contains an hour part that is greater than 23, the %H and %k format specifiers generate a value that is greater than 23, and the other hour format specifiers generate the hour value modulo 12.
Examples
obclient> SELECT TIME_FORMAT('100:00:00', '%H %k %h %I %l');
+--------------------------------------------+
| TIME_FORMAT('100:00:00', '%H %k %h %I %l') |
+--------------------------------------------+
| 100 100 04 04 4 |
+--------------------------------------------+
1 row in set