Functions and operators : ADD_YEAR( )

ADD_YEAR( )

Adds a specified number of years to a date value.

Syntax

ADD_YEAR(date, yearsToAdd)

Arguments

date

The date or date expression representing the start date.

yearsToAdd

The number of years to add to the start date. If you specify a negative number, the result is as if the number is subtracted from the start date.

Returns

The date value that results from adding the number of years to the start date.

Example

The following example adds 5 years to each date value in the HireDate data field.

ADD_YEAR([HireDate], 5)