Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mary
 
Posts: n/a
Default 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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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 . com,
"Mary" 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add one month to the previuos month heater Excel Discussion (Misc queries) 5 February 10th 05 12:33 AM
Month Year Date Format Jamie Excel Worksheet Functions 2 February 7th 05 06:43 PM
Accounting Month vs. Calendar Month JN Excel Worksheet Functions 4 January 31st 05 08:09 PM
UserForm to select current month or earlier Steve Excel Discussion (Misc queries) 2 January 21st 05 09:41 PM
How to extract month number from month name PM Excel Discussion (Misc queries) 2 January 19th 05 03:07 PM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"