Hi All,
Any one can explains the strange results from DATEDIF as decribed as follow:
In A1 and B1, I have 1st date and 2nd date.
Now I have in C1: =DATEDIF(A1,B1,"MD")
Case 1: A1=27/2/2012, B1=29/2/2012, ===> C1=2
A1=27/2/2012, B1=1/3/2012, ===> C1=5
Case 2: A1=29/4/2012, B1=30/4/2012, ===> C1=1
A1=29/4/2012, B1=1/5/2012, ===> C1=3
Case 3: A1=29/5/2012, B1=31/5/2012, ===> C1=2
A1=29/5/2012, B1=1/6/2012, ===> C1=2
In 3 cases, the 2nd date change from last date of this month to first date of next month, with 1 day different, but the difference btw 2 DATEDIF is 3 (case 1), 2 (case 2), 0 (case 3). I think the right result must be 1, which is the difference from the two 2nd date.
What is the reasonable advice should be given for this case?
Bookmarks