Things You'll Need:
-
Step 1
You need to know the syntax for the Microsoft Excel DATEDIF function:
=DATEDIF(Date1, Date2, Interval) -
Step 2
Use Excel cell references to the cells containing your dates to replace Date1 and Date2.
-
Step 3
Choose one of the following values for the interval argument in the DATEDIF function:
y - number of complete years.
m - number of complete months.
d - number of days.
md - difference between the days (months and years are ignored).
ym - difference between the months (days and years are ignored).
yd - difference between the days (years and dates are ignored). -
Step 4
Surround the interval value with quotes when you enter it into the your formula.
-
Step 5
A complete example of the Excel DATEDIF in use:
=DATEDIF(A2, B2, "m")
In this is example DATEDIF will return the difference between the dates in A2 and B2, in complete months. -
Step 6
Try it for yourself. Type two dates into two cells in Excel - make sure they're over a year apart to get the most from this exercise. Enter the DATEDIF formula in another cell. Start with "y" and work your way through all of the intervals. You'll understand the function a lot better by doing this!
















Comments
odoli said
on 2/1/2010 Thank you; this just helped me at work.
soanyway said
on 3/6/2009 Wow! thank you for this tidbit! I love excell and did not know this!
healthymomof5 said
on 2/2/2009 Very informative!5*