Days of the week before March 1, 1900 are incorrect in Excel

Support til Office 2003 er ophørt

Microsoft ophørte med at yde support til Office 2003 den 8. april 2014. Denne ændring har haft indflydelse på dine softwareopdateringer og sikkerhedsindstillinger. Se, hvad det betyder for dig, og hvordan du kan forblive beskyttet.

This article has been archived. It is offered "as is" and will no longer be updated.
When you use the WEEKDAY function to compute the day of the week for dates before March 1, 1900 in Microsoft Excel, 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 indicatesthat 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.
This problem occurs when the following conditions are true:
  • You use the WEEKDAY function to determine the day of the week for dates before March 1, 1900.
  • You use the 1900 date system.
To work around this problem, add one to the result of the formula as inthe following example:
More information
When the date system in Microsoft Excel was originally created, it wasdesigned to be fully compatible with date systems used by otherspreadsheet programs.

However, in this date system, the year 1900 is incorrectly interpreted asa 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 theerror only occurs when you use the 1900 Date System in Microsoft Excel.

This problem does not occur if you are using the 1904 date system. Whenyou use the 1904 date system and the WEEKDAY function to compute the day of the week for dates prior to January 1, 1904, the function returns a #VALUE! error.
year2000 y2k week day XL Excel 1900

Artikel-id: 214058 – Seneste udgave 01/05/2016 06:17:00 – Udgave 2.0

  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 2001 for Mac
  • Microsoft Excel for Mac 2011
  • Microsoft Excel 2016 for Mac
  • Microsoft Office Excel 2003
  • Microsoft Office Excel 2007
  • Microsoft Excel 2010
  • Microsoft Excel 2013
  • Excel 2016
  • kbpending kbprb kbarchive KB214058