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