Important
New database features are no longer connected to engine versions; features are now enabled independently during scheduled update windows, and “major” and “minor” releases no longer exist in Helios. Please visit the release notes to view the latest features available in your database clusters.
TIME_ FORMAT
On this page
The TIME_ function converts 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.
Refer to 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: