In MySQL, you can use the TIME_FORMAT()
function to format a time value.
This function works just like the DATE_FORMAT()
function, except that the value can only be formatted in hours, minutes, seconds, and microseconds.
See the table at the bottom of this article for a list of format specifiers that can be used with this function.