The ADDYEARS function adds a number of years to a date.

For example, you can use the ADDYEARS function to show a customer's contract end date.

ADDYEARS(Date, number)

ArgumentData typeDescription
DateDateThe date to add years to.
NumberNumberThe number of years to add to the date.

The ADDYEARS function returns a date result.

In Polaris, if you use a value of NaN (Not a Number) for the Number argument, the ADDYEARS function returns a blank value.

In the Classic Engine, a value of NaN used with ADDYEARS is equivalent to 0.

If you want to subtract the number of years from a date in a formula, you can use negative numbers. For example, ADDYEARS(Amended contract date, -2).

EDATE

In this example, a Contract Details module has line items on rows, and the Customers list on columns. Both line items have a date format.

The formula returns the date two years after the customer's contract start date.


Customer ACustomer B
Contract start date01/01/202101/06/2021

Contract end date

ADDYEARS(Contract start date, 2)

01/01/202301/06/2023

If you want to add years and days to a date, you can use additional numbers in your formula. In this example, the formula returns the date one year and seven days after the contract start date.


Customer ACustomer B
Contract start date01/01/202101/06/2021

Contract end date

ADDYEARS(Contract start date, 1) + 7

08/01/202208/06/2022