Function reference
Return the number of years one date occurs after another.

YearsAfter ( ‘date1’, ‘date2’ )

Argument Description
date1 A date value represented as string that is the start of the interval being measured
date2 A date value represented as string that is the end of the interval

Data type: Long
Returns a long containing the number of years

Example
This expression returns 3
YearsAfter( ’2010-04-21’ , ’2013-11-27’ )

Last modified: 23 May 2021