The ADDMONTHS function adds a number of months to a date.
For example, you can use the ADDMONTHS function to show a contractor's end date at a company.
Syntax
ADDMONTHS(Date, number)
Arguments
Argument | Data type | Description |
Date | Date | The date to add months to. |
Number | Number | The number of months to add to the date. |
The ADDMONTHS function returns a date result.
Calculation engine functionality differences
In Polaris, if you use a value of NaN (Not a Number) for the Number argument, the ADDMONTHS function returns a blank value.
In the Classic Engine, a value of NaN used with ADDMONTHS is equivalent to 0.
Additional information
If you want to subtract the number of months from a date, you can use negative numbers in a formula. For example, ADDMONTHS(Amended contract date, -6)
.
Excel equivalent function
Examples
In this example, a Contractor Details module has line items on rows and the Contractors list on columns. Both line items have a date format.
The formula returns the date six months after the contractor's start date.
Shala Engle | Eric Jones | |
Contractor start date | 02/08/2021 | 06/09/2021 |
Contractor end date
| 02/02/2022 | 06/03/2022 |
If you want to add months and days to a date, you can use additional numbers in your formula. In this example, the formula returns the date six months and 14 days after the contractor's start date.
Shala Engle | Eric Jones | |
Contractor start date | 02/08/2021 | 06/09/2021 |
Contractor end date
| 16/02/2022 | 20/03/2022 |