MySQL adds a time interval for the date: Date_add ()
Now ()//now function to get the current time
Select Date_add (now (), Interval 1 day); -Plus 1 days
Select Date_add (now (), interval 1 hour); -Plus 1 hours
Select Date_add (now (), interval 1 minute); -Plus 1 minutes
Select Date_add (now (), Interval 1 second); -Plus 1 seconds
Select Date_add (now (), interval 1 microsecond);-plus 1 milliseconds
Select Date_add (now (), Interval 1 week);-Plus 1 weeks
Select Date_add (now (), Interval 1 month);-Plus January
Select Date_add (now (), interval 1 quarter);-Plus 1 seasons
Select Date_add (now (), interval 1);-Plus 1 years
MySQL adddate (), Addtime () function, can be replaced with Date_add ().
2. MySQL for date minus one time interval: Date_sub ()
The MySQL date_sub () datetime function is consistent with the Date_add () usage.
MySQL in Subdate (), Subtime () function, recommended, with Date_sub () to replace.
MySQL date plus and minus days