TIME_ FORMAT
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
On this page
Convert the input time object to a string according to the specified format.
TIME_FORMAT (timeobj, format)
Arguments
-
timeobj: a valid time, date, datetime, or parsable date string
-
format: a string containing format symbols.
Only format symbols for the hour, minute, second, and microsecond parts are valid.
See DATE_
Return Type
String
Examples
SELECT TIME_FORMAT('12:05:47', '%s, %i, %h');
+---------------------------------------+
| TIME_FORMAT('12:05:47', '%s, %i, %h') |
+---------------------------------------+
| 47, 05, 12 |
+---------------------------------------+
Last modified: May 31, 2023