SELECT '1998-01-01' - INTERVAL 1 SECOND; : INTERVAL « Date Time Functions « MySQL Tutorial






mysql>
mysql> SELECT '1998-01-01' - INTERVAL 1 SECOND;
+----------------------------------+
| '1998-01-01' - INTERVAL 1 SECOND |
+----------------------------------+
| 1997-12-31 23:59:59              |
+----------------------------------+
1 row in set (0.00 sec)

mysql>








14.22.INTERVAL
14.22.1.Date arithmetic also can be performed using INTERVAL together with the + or - operator:
14.22.2.SELECT INTERVAL 1 DAY + '1997-12-31';
14.22.3.SELECT '1998-01-01' - INTERVAL 1 SECOND;