pick up time : Select Current_timestamp;output: 2016-06-16 16:12:52Select Now ();output:2016-06-16 16:12:52
Select Subdate (now (), Interval-second);output:2016-06-16 16:11:52
Take the next minute of the current time :
Select Adddate (now (), Interval-second); output:2016-06-16 16:13:52
By changing the units above. can be taken before and after minutes, hours, days of time
Take one minute before:Select subdate (now (), interval 1 minute); output: 2016-06-16 16:16:38
take one hour before the time:
Select subdate (now (), interval 1 hour); output: 2016-06-16 15:17:38
Take the day before:
Select subdate (now (), Interval 1 day); output: 2016-06-15 16:17:38###########################
Take one minute after the time:Select Adddate (now (), interval 1 minute); output: 2016-06-16 16:17:38
Take one hour after the time:
Select Adddate (now (), interval 1 hour); output:2016-06-16 17:17:38
Take the day after the time:
Select Adddate (now (), Interval 1 day);
Output:2016-06-17 16:17:38
Go
MySQL database based on the current system time, take a few seconds, minutes, hours, days