Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

TIME(expr) extracts the time part of the time or datetime expression expr and returns it as a string

mysql> mysql> SELECT TIME('2003-12-31 01:02:03'); +-----------------------------+ | TIME('2003-12-31 01:02:03') | +-----------------------------+ | 01:02:03                    | +-----------------------------+ 1 row in set (0.00 sec)