Adds a given number of years to a given date.
Date | DateTime.AddYears(Numeric-expression)
Where:
Date | DateTime
Is an attribute or variable based on the Date/DateTime data type, to which the method will add a certain number of years.
Numeric-expression
Is a Numeric expression that indicates the number of years to be added to the Date | DateTime.
Type returned:
Date | DateTime
Data Types: Date, DateTime
Returns a value which results from adding a number of years to a given date or date with time.
The result's data type will be the same as the given original value (Date or DateTime).
If the numeric expression is negative, the years are subtracted from the given date.
If &Today.Month() = 12
&ExpiryDate = &Today.AddYears(1)
EndIf
AddYr function
AddMonths method
AddDays method