Xbasic
ADDYEARS Function
Syntax
Ending_Date as D = ADDYEARS(D date,N years)
Arguments
- date
The date to which you will add business days.
- years
The number of years to add.
Description
Adds a number of years to a date.
Discussion
ADDYEARS() returns an Ending_Date equal to Date plus the specified Number_Of_Year s. The ADDYEARS() function works by adding the specified Number_Of_Year s to the Starting_Date and then checking if the resulting date is valid. If the resulting date is not valid (e.g., 2-29-92 plus 1 year is 2-29-93), Alpha Anywhere returns the next valid day (e.g., 3-1-93).
Example
? addyears({2-28-92},1) = {02/28/1993} ? addyears({2-29-92},1) = {03/01/1993}
See Also