show / hide menu

AddYears

This Function is used to add years to a date value.

Syntax:
AddYears(Date value, Number of years, Date Format)

Date Value is the date to which you need to add the given number of years.
Number of years is the years that needs to be added to the given date.
Date Format(Optional) : Current Date Format

Example:
DateTimePicker2.Value=AddYears(DateTimePicker1.Value,2)