Skip to main content
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

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.

Examples

text

keyword

TIMESTAMPADD