Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Diffence in Dates (Office 2000)

    Hi,
    What formula would I use that would give me the difference between two dates in days. In other words, if I have 6/30/04 in Col A and 6/15/04 in Col B, what formula would I put in Col C to give me "15" or "15 days".
    Thanks!
    Louise

  2. #2
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diffence in Dates (Office 2000)

    HI,

    Never mind. <img src=/S/doh.gif border=0 alt=doh width=15 height=15> It was in the formating.
    Louise

  3. #3
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Tampico, Tamps, Mexico
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diffence in Dates (Office 2000)

    Try this
    =DATEDIF(B1,A1,"d")

    the oldest date always is first

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Diffence in Dates (Office 2000)

    You could use
    =A1-B1
    or
    =ABS(A1-B1)
    to avoid negative results, but as Louise found out the result should be formatted as a number.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Tampico, Tamps, Mexico
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diffence in Dates (Office 2000)

    Hi Tony:


    The advantage for Louise to know function DATEDIF, is that also it can use it to obtain years and months

    =DATEDIF(A1,B1,

  6. #6
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diffence in Dates (Office 2000)

    Hi,
    Thanks for the replies! Didn't know about ABS or DATEDIF functions.
    What I did was a spreadsheet that shows when items that we are producing are due to be completed, when they actually were or when they are estimated to be. Some were early and some were late. Having minus days are ok in the case.

    Thanks for your help!
    Louise

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Diffence in Dates (Office 2000)

    Note: DATEDIF can't handle negative date differences, it'll display an error code if the second date is before the first one. Simply subtracting the dates as suggested by Tony does work for negative differences.

  8. #8
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Lawrence, Kansas, USA
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diffence in Dates (Office 2000)

    The function worked, but it doesn't show up in my list of functions or in Help. Are there other functions that work that aren't listed? Where would I find out about them?

  9. #9
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Diffence in Dates (Office 2000)

    Here is some info on "DateDif" Courtesy of Chip Pearson.

    Steve

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Diffence in Dates (Office 2000)

    As far as I know, DATEDIF is the only undocumented function (although it is reputed to be in the online help for Excel 2000; I can't verify that, since I went from Excel 97 to Excel 2002/XP.)

    You can read more about it in The DATEDIF Function on Chip Pearson's site.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •