Subtract from a date by using the SUBDATE() or DATE_SUB() functions: SUBDATE(, INTERVAL




Subtract from a date by using the SUBDATE() or DATE_SUB() functions: SUBDATE(, INTERVAL

   
pe>)
mysql>
mysql>
mysql> SELECT SUBDATE('2004-10-31 23:59:59', INTERVAL '12:10' HOUR_MINUTE);
+--------------------------------------------------------------+
| SUBDATE('2004-10-31 23:59:59', INTERVAL '12:10' HOUR_MINUTE) |
+--------------------------------------------------------------+
| 2004-10-31 11:49:59                                          |
+--------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
  








Related examples in the same category

1.SUBDATE(, ) allows you to subtract a specified number of days from a date: