Mega Code Archive

 
Categories / MySQL / Date Time
 

Some interval specifiers comprise both date and time parts

mysql> mysql> SELECT NOW( ), DATE_ADD(NOW( ),INTERVAL '14:30' HOUR_MINUTE); +---------------------+-----------------------------------------------+ | NOW( )              | DATE_ADD(NOW( ),INTERVAL '14:30' HOUR_MINUTE) | +---------------------+-----------------------------------------------+ | 2011-10-03 13:05:47 | 2011-10-04 03:35:47                           | +---------------------+-----------------------------------------------+ 1 row in set (0.00 sec) mysql>