The information in this article applies to:
SUMMARYIn Microsoft Excel, the YEARFRAC function does not recognize leap years, such as 1992, unless the leap date (for example, 2/29/92) is between the starting and ending dates. MORE INFORMATION
Note that the results in following examples are the results that are
returned in Microsoft Excel version 5.0. The results returned in Microsoft
Excel version 4.0 are slightly different, although the same behavior
occurs.
Example 1This example shows that YEARFRAC uses 365 days in the denominator instead of the 366 days in a leap year.
This function returns .084932, which is 31/365. Example 2This example shows that YEARFRAC uses 366 days in the denominator since the leap date falls between the starting and ending dates.
This function returns .415301, which is 152/366. YEARFRAC uses 366 days in the denominator only when the leap day falls between the start date and the end date. REFERENCES"Microsoft Excel Function Reference," version 4.0, page 469 Additional query words: 7.00
Keywords : |
Last Reviewed: March 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |