Thread: yearfrac
View Single Post
  #3   Report Post  
Myrna Larson
 
Posts: n/a
Default

I get that result if I use 3 as the 3rd argument. In that case, the actual
difference in days is used as the numerator, and the denominator is 365. The
only "basis" arguments which yield 4.000 are 0 and 4.

This function is "buggy", especially with arguments of 2 and 3 (or at least it
returns unexpected results). I think the fundamental reason for this is that
it was intended for use with time spans of less than one year, preferably with
both dates in the same calendar year, or, if they span a year-end, neither
year is a leap year.


On Fri, 23 Sep 2005 05:42:04 -0700, "slymeat"
.(donotspam) wrote:

I am using the yearfrac function to calculate the difference between dates

If I use the first date as 31/03/2005 and the 2nd date as 31/03/2009 and use
the yearfrac function, the result is 4.0027397260274

Why is it not 4.00 even?