PC Review


Reply
Thread Tools Rate Thread

datedif; what's up?

 
 
cate
Guest
Posts: n/a
 
      16th Dec 2009
I have found a use for this excel function but wonder about its
mysterious nature (undocumented?). Does anyone else use it?
Excel2003+
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      16th Dec 2009
Chip Pearson has some very nice notes:
http://www.cpearson.com/excel/datedif.aspx

cate wrote:
>
> I have found a use for this excel function but wonder about its
> mysterious nature (undocumented?). Does anyone else use it?
> Excel2003+


--

Dave Peterson
 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      16th Dec 2009
You might want to reconsider using the DATEDIF function. It is an
undocumented (and, thus, probably an unsupported) Excel function which
appears to be broken in XL2007 at Service Pack 2. Someone recently posted
this message as part of a newsgroup question...

**********************************************************************
=DATEDIF(DATE(2009,6,27),DATE(2012,1,5),"md")

In 2007, this gives me 122. This happens all the way up to the point
where the second date is 1/26/2012 and then it hits zero at 1/27/2012.
In 2002, however, it gives me the correct answer of 9.
**********************************************************************

An informal survey of fellow MVPs shows the above formula works correctly in
the initial release of XL2007 and its SP1, but does not work correctly in
SP2; hence, it appears to be broken at that level. The problem is that the
extent of the breakage is unknown (and probably indeterminable). In
addition, I would say, being an undocumented (and, thus, probably and
unsupported) function, the odds of Microsoft spending the time to search
down and fix whatever broke is slim. This would seem to mean that DATEDIF
cannot be counted on to work correctly from XL2007 SP2 onward. And even if
Microsoft did fix the problem in a subsequent Service Pack, any of your
users who remained at SP2 would be subjected to incorrect result.

--
Rick (MVP - Excel)


"cate" <(E-Mail Removed)> wrote in message
news:197d3b8f-a74c-4e15-9669-(E-Mail Removed)...
>I have found a use for this excel function but wonder about its
> mysterious nature (undocumented?). Does anyone else use it?
> Excel2003+


 
Reply With Quote
 
Joe User
Guest
Posts: n/a
 
      16th Dec 2009
"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You might want to reconsider using the DATEDIF
> function. It is an undocumented (and, thus, probably
> an unsupported) Excel function which appears to
> be broken in XL2007 at Service Pack 2.


Just because MS failed to document it, that does not mean it is unsupported.
Indeed, the very fact that its behavior changed in Excel 2007 SP2 might
suggest that someone is diddling ("supporting") it. Of course, on the other
hand, it might simply mean that something else changed internally, and no
one bothered to correct DATEDIF for the change.

In any case, I thought MVPs have special access to the MS technical staff.
Surely by now, some MVP has contacted them about DATEDIF and gotten the
straight poop on it: supported or not; to be fixed or not; deprecated or
not?

What is MS's answer to those questions?


----- original message -----

"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You might want to reconsider using the DATEDIF function. It is an
> undocumented (and, thus, probably an unsupported) Excel function which
> appears to be broken in XL2007 at Service Pack 2. Someone recently posted
> this message as part of a newsgroup question...
>
> **********************************************************************
> =DATEDIF(DATE(2009,6,27),DATE(2012,1,5),"md")
>
> In 2007, this gives me 122. This happens all the way up to the point
> where the second date is 1/26/2012 and then it hits zero at 1/27/2012.
> In 2002, however, it gives me the correct answer of 9.
> **********************************************************************
>
> An informal survey of fellow MVPs shows the above formula works correctly
> in the initial release of XL2007 and its SP1, but does not work correctly
> in SP2; hence, it appears to be broken at that level. The problem is that
> the extent of the breakage is unknown (and probably indeterminable). In
> addition, I would say, being an undocumented (and, thus, probably and
> unsupported) function, the odds of Microsoft spending the time to search
> down and fix whatever broke is slim. This would seem to mean that DATEDIF
> cannot be counted on to work correctly from XL2007 SP2 onward. And even if
> Microsoft did fix the problem in a subsequent Service Pack, any of your
> users who remained at SP2 would be subjected to incorrect result.
>
> --
> Rick (MVP - Excel)
>
>
> "cate" <(E-Mail Removed)> wrote in message
> news:197d3b8f-a74c-4e15-9669-(E-Mail Removed)...
>>I have found a use for this excel function but wonder about its
>> mysterious nature (undocumented?). Does anyone else use it?
>> Excel2003+

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datedif() Brad Microsoft Excel Misc 6 29th Oct 2008 06:35 PM
DateDif ? =?Utf-8?B?bmh2d2NoaWM=?= Microsoft Excel Worksheet Functions 3 24th Aug 2006 08:40 PM
DateDif Average? Damn DateDif UTCHELP Microsoft Excel Worksheet Functions 14 17th Nov 2005 10:30 AM
DateDif SpecialD Microsoft Excel Worksheet Functions 8 18th Mar 2004 04:18 PM
DATEDIF щаем Microsoft Excel Worksheet Functions 34 30th Sep 2003 09:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:50 AM.