Getting a date 6 months in the past : DATE_SUB : Date Time Functions MySQL TUTORIALS


MySQL TUTORIALS » Date Time Functions » DATE_SUB »

 

Getting a date 6 months in the past


mysql>
mysql>
mysql> SELECT DATE_SUB(CURDATE(), INTERVAL MONTH);
+---------------------------------------+
| DATE_SUB(CURDATE(), INTERVAL MONTH|
+---------------------------------------+
2007-01-21                            |
+---------------------------------------+
row in set (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» DATE_SUB