The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,909 other followers

Readable weekdays in Excel

Posted by jpluimers on 2019/09/30

Since I always forget this: [WayBackExceljet: Get day name from date

If you need to get the day name (i.e. Monday, Tuesday, etc.) from a date, there are several options depending on your needs.

Basically there are four ways go get the day of the week; the first three are readable, but when ordered, they are ordered alphabetically. The last one is numeric.

Combining the numeric with the text is easier in for instance Pivot Legend Fields (Series).

So here they go (based on the above link), assuming that B4 contains a timestamp:

  1. =WEEKDAY(B4) gives you the numeric weekday (starting with Sunday=1 to Saturday=7) which allows sorting in a meaningful order
  2. =TEXT(B4,"dddd") gives you the full day name of B4 in your locale
  3. =TEXT(B4,"ddd") gives you the shortened day name of B4 in your locale
  4. =CHOOSE(WEEKDAY(B4),"Sun","Mon","Tue","Wed","Thu","Fri","Sat") gives you a name of your liking from a series of 7 texts

Note that depending on your locale, these formulas might actually need a semicolon:

  1. =WEEKDAY(B4)
  2. =TEXT(B4;"dddd")
  3. =TEXT(B4;"ddd")
  4. =CHOOSE(WEEKDAY(B4);"Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat")



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: