Home Search

DriveWorks Pro 24
DateAddYears

Send Feedback

DateAddYears

Adds a specified number of years to a date value.

Syntax

DateAddYears(Start Date, Years)

Where:

Start Date The date to adjust.

Years The number of years to add. Negative values can be used to subtract.

Examples

Example 1

DateAddYears(Now(),2)

Will add two years to the result of the Now function.

Example 2

DateAddYears(Now(),-3)

Will subtract three years from the result of the Now function.

Example 3

DateAddYears(DatePicker1Return,4)

Will add four years to the result of the Date Picker control.