DateDif
Description
Calculates the number of days, months, or years between two dates.
Syntax
double datedif(double start_date, double end_date, string unit)
Parameters
start_date
- is a Julian Date Value which represents the first, or starting date of a given period.
end_date
- is a Julian Date Value which represents the last, or ending date of a given period.
unit
- The type of information that you want returned.
- "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
Return
Return the number of days, months, or years between two dates.
Example
datedif(date(1/1/2001),date(1/1/2003),"Y")=;//2