Months

J

Jose

I have the following problem with dates:
C3 D3
01/08/2008 31/11/2009


When I ask D3-C3 I get 5 instead of 18. How am I doing wrong?
 
P

Peo Sjoblom

What are those dates supposed to be?

1. How can you expect to get 18 regardless and how can you get 5?

2. 31/11/2009 or 11/31/2009 US date format is a non-existent date, so that
will be a text string. There are only 30 days in November

Assume it was 11/30/2009

then the result would be

486 assuming that 01/08/2008 is the first of August 2008, if you are mixing
date format and
the first is US format and Jan 8 2008m then the difference would be 692

--


Regards,


Peo Sjoblom
 
N

Niek Otten

Hi Jose,

I'm surprised you get anything at all, because according to Excel 31/11/2009 is not a valid date.
But I can't understand why you expect 18 as a result.
What is your formula?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I have the following problem with dates:
| C3 D3
| 01/08/2008 31/11/2009
|
|
| When I ask D3-C3 I get 5 instead of 18. How am I doing wrong?
| --
| Many thanks for your help,
| Jose
 
P

Peo Sjoblom

Sorry, didn't see your subject, use

=DATEDIF(earlier_date_later_date,"m")


but your date is still wrong, November has only 30 days and
if you mean 11/30/08 then it would be 15 months

and finally if you want to disregard the year you can use

=DATEDIF(C3,D3,"ym")

--


Regards,


Peo Sjoblom

Peo Sjoblom said:
What are those dates supposed to be?

1. How can you expect to get 18 regardless and how can you get 5?

2. 31/11/2009 or 11/31/2009 US date format is a non-existent date, so that
will be a text string. There are only 30 days in November

Assume it was 11/30/2009

then the result would be

486 assuming that 01/08/2008 is the first of August 2008, if you are
mixing date format and
the first is US format and Jan 8 2008m then the difference would be 692

--


Regards,


Peo Sjoblom
 
Top