Bug with DATEDIF and Md is it possible ?

M

MichDenis

Hi,

Does someone have an explanation ?

2 Dates in 2 cells
A1 = 01/31/2008
A2 = 03/01/2009

With this formula : =DATEDIF(A1;A2;"md")
The answer = -1

With this 2 dates :
A1 = 01/30/2008
A2 = 03/01/2009
With this formula : =DATEDIF(A1;A2;"md")
The answer = 0

Is it really a bug ?

Thank for your participation.
 
M

MichDenis

Sorry - > Correction : 03/01/2008 instead 03/01/2009


"MichDenis" <[email protected]> a écrit dans le message de (e-mail address removed)...
Hi,

Does someone have an explanation ?

2 Dates in 2 cells
A1 = 01/31/2008
A2 = 03/01/2009

With this formula : =DATEDIF(A1;A2;"md")
The answer = -1

With this 2 dates :
A1 = 01/30/2008
A2 = 03/01/2009
With this formula : =DATEDIF(A1;A2;"md")
The answer = 0

Is it really a bug ?

Thank for your participation.
 
K

ker_01

I believe the syntax uses commas, rather than semicolons? try the following:
=DATEDIF(A1,A2,"MD")

HTH,
Keith
 
M

MichDenis

I know, it's simply because i work with a french version and we use semicolons...

Have you tried your formula with the suggested dates ?

Thank for your participation.




"ker_01" <[email protected]> a écrit dans le message de [email protected]...
I believe the syntax uses commas, rather than semicolons? try the following:
=DATEDIF(A1,A2,"MD")

HTH,
Keith
 
J

JE McGimpsey

Whether semi-colons or commas are used as separators is a function of
the application language (semi-colons are typically used in European
languages).

The problem is that DATEDIF() uses the length of the first month to
determine what a "month" is.

This problem (with variations of the given example) has been discussed
here many, many times.

Because "month" is a fuzzy concept, there's simply no definition of
"month" that will allow both algorithmically consistent, and generally
acceptable, results without including this kind of anomaly.
 
M

MichDenis

Thanks for your explanation.


"JE McGimpsey" <[email protected]> a écrit dans le message de (e-mail address removed)...
Whether semi-colons or commas are used as separators is a function of
the application language (semi-colons are typically used in European
languages).

The problem is that DATEDIF() uses the length of the first month to
determine what a "month" is.

This problem (with variations of the given example) has been discussed
here many, many times.

Because "month" is a fuzzy concept, there's simply no definition of
"month" that will allow both algorithmically consistent, and generally
acceptable, results without including this kind of anomaly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top