Introduction To The DATEDIF Function

=DATEDIF(Date1, Date2, Interval)
IntervalMeaningDescription
mMonthsComplete calendar months between the dates.
dDaysNumber of days between the dates.
yYearsComplete calendar years between the dates.
ymMonths Excluding YearsComplete calendar months between the dates as if they were of the same year.
ydDays Excluding YearsComplete calendar days between the dates as if they were of the same year.
mdDays Excluding Years And MonthsComplete calendar days between the dates as if they were of the same month and same year.

=DATEDIF(A1,B1,"y")&" years "&DATEDIF(A1,B1,"ym")&" months "&DATEDIF(A1,B1,"md")
&" days"


12 years 8 months 14 days

Comments

Popular posts from this blog

50 Excel VBA Oral Interview Questions