DATEDIF()
Syntax. DATEDIF(start_date,end_date,unit)
Definition. This function calculates the interval between a start and an end date (period) in years, months, or days.
Arguments
start_date (required). The start date of the period.
end_date (required). The end date of the period.
unit (required). The unit type returned. The following units are available:
Y returns the number of whole years within the period.
M returns the number of whole months within the period.
D returns the number of days within the period.
MD returns the number of days between the two dates as if the dates were in the same month and year
YM returns the number of months between the two dates as if the dates were in the same year
YD returns the number of days between the two dates as ...
Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.