Apple iWork Numbers Function Reference
DATEDIF
Description
The DATEDIF function finds the number of days, months, or years between two dates.
Syntax
DATEDIF(start-date, end-date, method)
- start-date: The starting date.
- end-date: The ending date.
- method: Specifies whether the time difference is expressed in years, months, or days and how the calculation handles dates in different years or months:
“D” counts the days between the dates.
“M” counts the months between the dates.
“Y” counts the years between the dates.
“MD” counts the days between the starting and ending days of the month, ignoring months and years. If the starting day is after the ending day, the count starts from the ending day as if it were in the preceding month. The year of the end-date is used to check for a leap year.
“YM” counts the number of whole months between start-date and end-date, ignoring the year. If the starting month/day is before the ending month/day, the dates are treated as though they are in the same year. If the starting month/day is after the ending month/day, the dates are treated as though they are in consecutive years.
“YD” counts the number of days between the starting month/day and ending
month/day, ignoring years.
Examples









