INTERVAL (DateTime)
Adds a specified number of seconds, minutes, or hours to a datetime
Description
The INTERVAL
function enables you to perform datetime arithmetic by adding or subtracting a specified number of seconds, minutes, or hours to a given datetime. This is useful for scheduling, time-based calculations, or event planning.
Syntax
datetime
+ INTERVAL number
SECOND/MINUTE/HOUR
datetime
: The initial datetime value to which you want to apply the interval.number
: The numeric value representing the amount you want to add or subtract.SECOND/MINUTE/HOUR: Specify the time unit (second, minute, or hour) for the interval.
Example
Table
Team Meeting
2023-09-05 09:00:00
Project Kickoff
2023-09-10 14:30:00
Training
2023-09-15 10:00:00
Function
`Start Time` + INTERVAL 30 MINUTE
Results
2023-09-05 09:30:00
2023-09-10 15:00:00
2023-09-15 10:30:00
Last updated