Function CalculateLeaseYearsRemaining
Outputs a number with trailing decimal zeros removed.
CalculateLeaseYearsRemaining([RETURNTYPE],[LEASETERM],[LEASESTART],[TODAY])Parameters
| # | Type | Passing | Default | Name | Description/Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | integer | required | 1 | RETURNTYPE | What to return:
|
||||||||||||
| 2 | integer | required | n/a | LEASETERM | The number of years for the lease or remaining if no LEASESTART provided | ||||||||||||
| 3 | date | required | n/a | LEASESTART | The date the lease started, will accept null values from data. See parameter 2. | ||||||||||||
| 4 | date | optional | DATE()/Today | TODAY | The date to use in calculation for years left |
Returns
The formatted value as a string
Examples
CalculateLeaseYearsRemaining(3,LEASETERM,LEASESTART,DATE())
CalculateLeaseYearsRemaining(3,PROPERTY.LEASETERM,PROPERTY.LEASESTART,DATE())
CalculateLeaseYearsRemaining(3,PROPERTY.LEASETERM,PROPERTY.LEASESTART)
The above 3 all return the same value if supplied the same LEASETERM and LEASESTART
