mysql>select now()
+---------------------+
| now() |
+---------------------+
| 2010-08-25 09:34:41 |
+---------------------+
1 row in set (0.00 sec)
mysql>select date_add(now(),interval -1 year)
+----------------------------------+
| date_add(now(),interval -1 year) |
+----------------------------------+
| 2009-08-25 09:34:44 |
+----------------------------------+
1 row in set (0.00 sec)
mysql>select date_sub(now(),interval 1 year)
+---------------------------------+
| date_sub(now(),interval 1 year) |
+---------------------------------+
| 2009-08-25 09:34:46 |
+---------------------------------+
1 row in set (0.00 sec)
mysql>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)