+ Reply to Thread
Results 1 to 2 of 2

DATEDIF calculates a month off

  1. #1
    Mary
    Guest

    DATEDIF calculates a month off

    Suppose my start and end dates are in A1 & A2 respectively and I want
    to count the number of months between them

    A1: 09/01/04
    A2: 01/31/05

    =DATEDIF(A1,A2,"M") returns 4, instead of the correct count of 5.

    What's up with that?

    Anybody?

    Thanks.
    M&M


  2. #2
    JE McGimpsey
    Guest

    Re: DATEDIF calculates a month off

    DATEDIF(...,"m") counts only whole months, presuming that days start at
    midnight. So your span is only 4 months and 30 days long, not 5 months.

    Of course, the whole concept of months is rather squirrelly. For
    instance, one month after 1/30/05 - is it 2/28/05 (29 days), 3/1/05 (30
    days)?, 3/2/05 (31 days)?

    In article <[email protected]>,
    "Mary" <[email protected]> wrote:

    > Suppose my start and end dates are in A1 & A2 respectively and I want
    > to count the number of months between them
    >
    > A1: 09/01/04
    > A2: 01/31/05
    >
    > =DATEDIF(A1,A2,"M") returns 4, instead of the correct count of 5.
    >
    > What's up with that?


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1