DATEADD

Use the DATEADD function to add or subtract date units for a date. The result is a date or timestamp.

The first parameter is the datepart, such as yy for year or month. The second parameter is the number of units to add. The number may be positive or negative. The third parameter is the date or timestamp value or expression.

Syntax

DATEADD(datepart,number_of_units,date_expression)