Why are Excel weekdays wrong for 1900?

Posted by Jeroen Wiert Pluimers on Super User See other posts from Super User or by Jeroen Wiert Pluimers
Published on 2012-09-30T14:43:12Z Indexed on 2012/09/30 15:40 UTC
Read the original article Hit count: 364

Filed under:
|

This question is based on the observations of AdamV in his answer on How do I get the day name into a cell in Excel?

When A1 has the value 2009-08-01, then:

  • =WEEKDAY(A1) will obtain 7
  • =TEXT(7, "dddd") will obtain Saturday
  • =TEXT(7,"dddd, yyyy-mm-dd") will obtain Saturday, 1900-01-07
  • =TEXT(1,"dddd, yyyy-mm-dd") will obtain Sunday, 1900-01-01
  • =TEXT("1900-01-01","dddd, yyyy-mm-dd") will also obtain Sunday, 1900-01-01

The last two are wrong: the 1st of January 1900 is actually a Monday.
Various sources seem to confirm that:

What am I missing? Why is Excel doing this wrong?

© Super User or respective owner

Related posts about microsoft-excel

Related posts about dayofweek