Calculate the difference between two dates in years, months, or days.
Enter the beginning date of the time period (e.g., "01/01/2001", A5, or TODAY()). Ensure double quote with dates.Generated Formula:
Scenario | Formula |
---|---|
Calculate age in years | =DATEDIF(A1, TODAY(), "Y") |
Find the number of months between two dates | =DATEDIF(A1, B1, "M") |
Get the number of days between two dates | =DATEDIF(A1, B1, "D") |
Difference in days, ignoring years | =DATEDIF(A1, B1, "YD") |
Difference in days, ignoring months and years | =DATEDIF(A1, B1, "MD") |
Calculate the exact age in years, months, and days | =DATEDIF(A1, TODAY(), "Y") & " years, " & DATEDIF(A1, TODAY(), "YM") & " months, " & DATEDIF(A1, TODAY(), "MD") & " days" |