Tech Tips Home
The Best Tech Tips And Daily Deals

WorldStart Tech Tip And Store Search

Like what you see here? Subscribe to the Tech Tips newsletter!   Email: Subscribe

# DATEDIF

Friday, July 7th, 2006 by | Filed Under: MS Excel, MS Office Help

DATEDIF

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:

=DATEDIF(A1,B1,”m”)

(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!

~ April

• Tech Tips Daily - Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

• WorldStart's Daily Deals - Every week, we send out great deals in our Daily Deals newsletter. Many of these deals are exclusively for our Daily Deals newsletter subscribers and can't be found with our regular specials.

• Just For Grins - Each issue includes a couple clean jokes, some funny quotes, and a hilarious reader's story. Newsletter is sent five days a week.

Subscribe

We only use it to send you the newsletters you request. It is NEVER disclosed to a third party for any reason, ever! Plus, if you decided you don't like our newsletters (don't worry, you'll love them), unsubscribing is fast and easy.

Tech Tips Daily

Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

Tech Tips Weekly

The week's best in tech and computer help. Get your issue sent to your email every Friday!

WorldStart's Daily Deals

The very best deals on the Internet! Get a new set of incredible sales every day of the week!

Just For Grins

Clean jokes, funny quotes, and hilarious comics. Sent 5 times a week straight to your email.

Subscribe

Categories:
Archives: