Complete the formula to calculate the number of days between two dates in cells A1 and B1.
=DATEDIF(A1, B1, [1])The unit "D" tells DATEDIF to calculate the total number of days between the two dates.
Complete the formula to find the number of complete months between dates in A2 and B2.
=DATEDIF(A2, B2, [1])The unit "M" returns the number of complete months between two dates.
Fix the formula to calculate the number of days ignoring months and years between A3 and B3.
=DATEDIF(A3, B3, [1])The unit "MD" returns the difference in days ignoring months and years.
Fill both blanks to calculate the difference in years and months between dates in A4 and B4.
=DATEDIF(A4, B4, [1]) & " years and " & DATEDIF(A4, B4, [2]) & " months"
"Y" gives complete years difference, and "YM" gives leftover months ignoring years.
Fill all three blanks to calculate the difference as years, months, and days between A5 and B5.
=DATEDIF(A5, B5, [1]) & " years, " & DATEDIF(A5, B5, [2]) & " months, and " & DATEDIF(A5, B5, [3]) & " days"
"Y" returns full years, "YM" returns leftover months ignoring years, and "MD" returns leftover days ignoring months and years.