mysql 时间加减函数

SELECT NOW() AS now,DATE_ADD(now(),INTERVAL 1 DAY ) AS tomorrow,DATE_SUB(now(),INTERVAL 1 DAY) AS yeaterday

 

SELECT DATE_ADD('2013-2-27',INTERVAL 4 YEAR) AS year;

SELECT DATE_ADD(now(),INTERVAL 4 HOUR) AS next time;

 

你可能感兴趣的:(mysql)