MonthsBetween Function
Description:
The number of whole months between the start date and the finish date.
If the start date is before the finish date then the months between is a positive number.
If the start date is after the finish date then the months between is a negative number.
Returns:
Whole Number
Parameters:
Parameter | Data Type | Description |
|---|---|---|
1 | Date | The start date. |
2 | Date | The finish date. |
Examples:
When using functions inside a field, remember the field brackets:
{MonthsBetween(AgreementDate, TerminationDate)}
Expression | Result |
|---|---|
MonthsBetween( Date( 1999, 2, 28 ), Date( 2000, 2, 29 ) ) | 12 |
MonthsBetween( Date( 2000, 2, 29 ), Date( 1999, 2, 28 ) ) | -13 |