Difference in Days – DATEDIF

June 23rd, 2005 | Categories: Formulas | Tags: , , ,
-->

DATEDIF is handy for formulas which find the difference in dates. Particularly, I use it most to quickly find the days from an event or to one.

The DATEDIF syntax:

=DATEDIF(EarlierDate, LaterDate, Format)

=DATEDIF(A3,B3,"d")

For more on the DATEDIF Formats and usage, check out Pearson Consulting: DATEDIF

The following is a picture example that demonstrates using DATEDIF to determine the days to and from an event. The first calculates the days since Tom Quit smoking and the second calculates the days to a wedding.

datedif

(Note: 58 days until I attempt a 5k race ;-)

Can't get the tutorial to work for you? Need help with your code?
Get answers right away at our AE Excel Support Forums!
  1. Juan Pablo Gonz
    June 23rd, 2005 at 16:54
    Reply | Quote | #1

    Note that when trying to find the difference in days, specifically, it is much easier to just use

    =B3-A3

  2. Mark
    June 23rd, 2005 at 17:56
    Reply | Quote | #2

    Juan, thanks for stopping by.

    I use datedif because additional formatting isn’t required.

    If I simply subtract the two dates, the result is another date, which isn’t what I’m after.

  3. June 24th, 2005 at 01:54
    Reply | Quote | #3

    Good to see you’re still running :)

  4. June 25th, 2005 at 06:22
    Reply | Quote | #4

    Good luck in the race ;-)

  5. June 26th, 2005 at 10:02
    Reply | Quote | #5

    yep good luck Mark

  6. Mark
    July 4th, 2005 at 17:16
    Reply | Quote | #6

    Thanks all!