Mysql date plus a number of days to get a new date

Original Address: https://476057266-qq-com.iteye.com/blog/2047671

Adding three days to the current date, the number of days easily changed: 

the SELECT DATE_ADD (the CURRENT_DATE (), interval The Day. 3); 



on the specified date plus three days: 
the SELECT DATE_ADD ( '2014-04-17', interval The Day. 3); 



plus a specific time on the specified time: 

 
as in "2012 at 2:00 on January 1" plus an hour and ten seconds is zero MySQL statement: 

the SELECT DATE_ADD ( '2014-04-17 2:00: 00 ', interval' a 1:10:10 'hour_second); 



SELECT DATE_ADD (date, interval Day. 1); 
SELECT DATE_ADD (date, interval. 1 hour); 
SELECT DATE_ADD (date, interval. 1 minute); 
SELECT DATE_ADD (date, interval . 1 SECOND); 
SELECT DATE_ADD (date, interval. 1 microsecond); 
SELECT DATE_ADD (date, interval. 1 Week); 
SELECT DATE_ADD (date, interval. 1 month The); 
SELECT DATE_ADD (date, interval. 1 Quarter); 
SELECT DATE_ADD (date, interval 1 year); 

Guess you like

Origin www.cnblogs.com/phpk/p/10935312.html