Current time:
Mysql> Select Now ();
+---------------------+
| Now () |
+---------------------+
| 2014-07-03 21:16:22 |
+---------------------+
1 row in Set (0.00 sec)
Next one months:
MySQL> select Date_add (Now (), Interval 1 month);
+----------------------------------+
| Date_add (now (), Interval 1 month) |
+----------------------------------+
| 2014-08-03 21:16:28 |
+----------------------------------+
1 row in Set (0.00 sec)
Last one months:
Mysql> Select Date_add (now (), Interval-1 month);
+-----------------------------------+
| Date_add (now (), Interval-1 month) |
+-----------------------------------+
| 2014-06-03 21:17:02 |
+-----------------------------------+
1 row in Set (0.00 sec)
Three months ago:
Date_sub (now (), INTERVAL 3 MONTH)
Three days ago:
SELECT Date_sub (now (), INTERVAL 3 day)
MySQL a few days ago, a few months ago