Have you ever found yourself trying to find the time difference between two dates?
That is, how many days, months or years have passed between the two?
What did you do?
For some things, it’s a matter of a calendar and a lot of counting.
Not very efficient, is it?
No, I didn’t think so either.
Want a quicker way to find the time difference between dates?
Yes? I thought you might.
Well, believe it or not, there is a quick and easy way to get the information by using Excel. It’s all in the formula you use.
Next time you’re looking for the difference between two dates, give DATEDIF a try.
First, you need to put the two dates into separate cells.
Now, you’re ready for the formula set up:
=DATEDIF(location of date #1, location of date #2, “data you want returned”)
As for the “data you want returned,” here’s the run-down of your choices.
“y” will return the number of years between the two dates.
“m” will return the number of months between the two dates.
“d” will return the number of days between the two dates.
“ym” will return the number of months past the last full year.
“yd” will return the number of days past the last full year.
For example, if you put one date in cell A1 and the other in B1, your formula for the number of months would look like this:
(Yep, that’s right, the quotes are needed around the returned data code).
This isn’t a formula listed in the online help or the function list, but it works!
So, if it’s something useful to you, be sure to keep it safe somewhere.
Yeah! No more calendar counting!
Just a few seconds in Excel and you’ve got all the answers you need, no calendar required!