datedif
Difference between two dates in a chosen unit.
Syntax
Section titled “Syntax”v = datedif(start_date, end_date, unit)Description
Section titled “Description”Returns the elapsed time between start_date and end_date in the requested unit:
'Y'— complete years'M'— complete months'D'— days'YM'— months ignoring years'YD'— days ignoring years'MD'— days ignoring years and months
Example
Section titled “Example”datedif(date(2020,1,1), date(2026,4,28), 'Y') % 6