The ADDMONTHS function adds a number of months to a date.
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.
ADDMONTHS(Date, number)
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.
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)
.
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.
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 |
Disclaimer
We update Anapedia content regularly to provide the most up-to-date instructions.