PSS ID Number: 106339
Article Last Modified on 8/15/2003
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q106339
SYMPTOMS
When you use the WEEKDAY function to compute the day of the week for dates prior to March 1, 1900, the function returns an incorrect result.
For example, if you use the WEEKDAY function to determine the day of the week for February 16, 1900, Microsoft Excel returns 5, which indicates that February 16 was a Thursday. The function should return 6, because February 16, 1900, was actually a Friday.
When you use the WEEKDAY function to find the day of the week for dates on or after March 1, 1900, the function returns the correct answer.
CAUSE
This problem occurs when the following conditions are true:
- You use the WEEKDAY function to determine the day of the week for dates prior to March 1, 1900.
-and-
- You use the 1900 date system.
WORKAROUND
To work around this problem, add one to the result of the formula as in the following example:
=WEEKDAY("2/16/1900",1)+1
MORE INFORMATION
When the date system in Microsoft Excel was originally created, it was designed to be fully compatible with date systems used by other spreadsheet programs.
However, in this date system, the year 1900 is incorrectly interpreted as a leap year. Because there is no February 29 ("leap day") in the year 1900, the day of the week for any date before March 1, 1900 (the day after the "leap day"), is not computed correctly.
Note that this only affects dates before March 1, 1900, and that the error only occurs when using the 1900 Date System in Microsoft Excel.
This problem does not occur if you are using the 1904 date system. When you use the 1904 date system and you use the WEEKDAY function to compute the day of the week for dates prior to January 1, 1904, the function returns a #VALUE! error.
How to Change the Date System
To change to the 1900 date system in Microsoft Excel, follow these steps:
- On the Tools menu, click Options (or click Preferences). Then, click the Calculation tab.
-or-
In Excel 4.0 and 4.0a, click Calculation on the Options menu.
- Click to clear the 1904 Date System check box, and then click OK.
Additional query words: 2.00 2.10 2.20 2.21 5.00c 97 year2000 y2k XL97 XL7 XL5 XL4 XL3 XL2 week day XL
Keywords: kbbug kbpending KB106339
Technology: kbExcel97Search kbExcelSearch kbExcelWinSearch kbZNotKeyword3