Mega Code Archive

 
Categories / MySQL / Date Time
 

Extract the entire time value by using the TIME() function

mysql> mysql> SELECT TIME('2004-12-31 23:59:59'); +-----------------------------+ | TIME('2004-12-31 23:59:59') | +-----------------------------+ | 23:59:59                    | +-----------------------------+ 1 row in set (0.00 sec) mysql>