SELECT SUBDATE('1998-01-02', INTERVAL 31 DAY); : SUBDATE « Date Time Functions « MySQL Tutorial






mysql>
mysql> SELECT SUBDATE('1998-01-02', INTERVAL 31 DAY);
+----------------------------------------+
| SUBDATE('1998-01-02', INTERVAL 31 DAY) |
+----------------------------------------+
| 1997-12-02                             |
+----------------------------------------+
1 row in set (0.00 sec)

mysql>
mysql>








14.40.SUBDATE
14.40.1.SUBDATE(date,INTERVAL expr unit)
14.40.2.SELECT SUBDATE('1998-01-02', INTERVAL 31 DAY);
14.40.3.SUBDATE(expr,days): The second form allows the use of an integer value for days