Use the DateDif() function to calculate the number of days, months, or years between two dates.
Syntax double datedif(double start_date, double end_date, string unit)
Units allow
"Y" = year, "M" = month, "D" = day,
"MD" = The difference between the days in start_date and end_date. The months and years of the dates are ignored.
"YM" = The difference between the months in start_date and end_date. The days and years of the dates are ignored