reference:evaluator:datediff

DateDiff(
     string:units,
     date:date1,
     date:date2
)
int

Arguments

units

Unit type to return. Valid unit types are:

yyyyYears
qQuarter years
mMonths
yDays
dDays
wWhole weeks
wwCalendar weeks (number of Sundays)
hHours
nMinutes
sSeconds

date1

The first date.

date2

The second date.

Return value

Difference between the two dates.

Description

Returns the difference between the two supplied dates, expressed as units.

Example:

Output(DateDiff("yyyy", "2021-01-01", "2023-01-01"))
--> 2