timestampadd
Adds an integer expression interval to the date or datetime expression datetime_expr.
The unit for the interval as mentioned must be one of the following:
MILLISECOND (since 3.2), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, or YEAR.
Syntaxβ
DATETIME TIMESTAMPADD(unit, interval, DATETIME datetime_expr)
Parametersβ
datetime_expr: the DATE or DATETIME value to which you want to add a time interval.interval: an integer expression that specifies the number of intervals to add.unit: the unit of the time interval to add. Supported units include MILLISECOND (since 3.2), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, and YEAR.
Return valueβ
Returns a value of the same data type as datetime_expr.