The information in this article applies to:
SYMPTOMS
If you use the EDATE function to return a date that is a specific
number of months before or after another date, the function may return an
incorrect result.
CAUSEThis problem occurs when the following conditions are true:
WORKAROUNDTo work around this problem, manually modify the formulas that use the EDATE function so that they return the correct result. ExampleAssume that you are using the following date and formula:
The formula in cell A2 returns 3/1/2100; however, the date you expect to
receive is 2/28/2100. You can correct the formula by adding "-1" (without
the quotation marks) to the end of the formula, as in the following
example:
The formula returns 2/28/2100, which is the correct result.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem no longer occurs in Microsoft Excel 2000. MORE INFORMATIONThe EDATE function, which is included in the Analysis ToolPak, allows you to return a date that is a specific number of months before or after another date. For example, if you want to know the date six months from today, you can use the following formula:
If today is 1/13/98, the function returns 7/13/98, the day that is six
months after today.
The problem described in this article occurs only when the EDATE function returns a date in February of a century year that is not a leap year, for example:
The formulas in cells B1 and B2 return the correct results (dates
2/27/2100 and 2/28/2100), because the start date does not fall on the
29th, 30th, or 31st of the month.
The formulas in cells B3, B4, and B5 return the incorrect result, 3/1/2100, instead of the correct result, 2/28/2100. The problem occurs because the start dates fall on the 29th, 30th, and 31st of the month. For more information about leap years, please see the following article in the Microsoft Knowledge Base: Q118923 XL: Method to Determine Whether a Year Is a Leap YearWhen you enter or fill dates in a worksheet in Microsoft Excel 97, a date that should appear as January 1 may instead appear as February 1. For more information on about this issue, please see the following article in the Microsoft Knowledge Base: Q175362 XL97: January 1 May Appear as February 1 in a Date Additional query words: XL97 y2k year2000
Keywords : kbtool kb2000 xlformula xladdins |
Last Reviewed: December 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |