Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Given a date, how do I get the day of the week (e.g. "Monday") into a cell in Excel?

share|improve this question
2  
Well, you could type M-O-N-D-A-Y into the cell with your keyboard... but somehow I think you mean something different. –  Mike Cooper Sep 15 '09 at 23:07
    
Oh yeah :o) I could indeed type it. I'll update the question to make it more specific –  Don Vince Sep 15 '09 at 23:13

7 Answers 7

up vote 33 down vote accepted

Simple example:

A1 cell: 1/8/2009
B1 cell: =TEXT(WEEKDAY(A1),"dddd")

This will, for the given date, print the corresponding day.

Is this what you wished ?

share|improve this answer
    
Many thanks! Small typo: there is a semicolon in the middle which should be a comma. –  Don Vince Sep 15 '09 at 23:12
    
Thanks for the correction Molly –  Don Vince Sep 15 '09 at 23:42
    
@Don Vince - Ups, sorry about that. –  ldigas Sep 15 '09 at 23:53
    
The semicolon is required in localisations (Regional Settings in Windows) that use the comma for the decimal separator. Like in languages where the English 1,000.00 (one thousand) would be written as 1.000,00 and would thus be entered as 1000,00 in Excel. I actually thought a semicolon was always accepted, but I may be wrong about that. –  Arjan Sep 16 '09 at 0:03
3  
This is only working because of an oddity of the 1/1/1900 being a Sunday. Lose the weekday function completely, just use =TEXT(A1,"dddd") (see my fuller answer below) –  AdamV Nov 2 '09 at 11:05

Displays current date

=TEXT(WEEKDAY(MONTH(TODAY())),"dddd")  

Displays current date with required required text.

=CHOOSE(WEEKDAY(MONTH(TODAY())), "S-U-N-D-A-Y","M-O-N-D-A-Y","T-U-E-S-D-A-Y","W-E-D-N-E-S-D-A-Y","T-H-R-S-D-A-Y","F-R-I-D-A-Y","S-A-T-U-R-D-A-Y")
share|improve this answer

A1 cell: 1/8/2009 B1 cell: =A1 then press ctrl+1 (format cell) select number tab, click custom then type "DDDD" on the type txtbox

share|improve this answer

you can also localize the answer by using [$nnn] before the format (so the custom code is: [$nnn]dddd;@). change nnn with the proper language code. i don't have the list, but somehow, english code is -409 (and my local is -421).

i think you can experiment with Number format, change the language field, then change it back to custom format.

share|improve this answer
1  
Welcome to SuperUser. Answers should always be self contained, so please expand your answer into a working example. Also we don't know where you come from, so my local is a little unspecific. –  Tim Oct 10 '13 at 16:18

I found that nesting IF statements can be cumbersome, but it does work. If, however, you'd like to save a little typing, you may try this:

=CHOOSE(WEEKDAY(A2), "Sun","Mon","Tue","Wed","Thur","Fri","Sat")

Or, if you need full names:

=CHOOSE(WEEKDAY(A2), "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

In this example, "A2" can be whatever cell (or formula) contains the date in question. For instance:

=CHOOSE(WEEKDAY(TODAY()), "Sun","Mon","Tue","Wed","Thur","Fri","Sat") would print the abbreviation for whatever today is.
share|improve this answer

The answer given above is only working by fluke because Excel thinks that 1/1/1900 was a Sunday* and by default Excel is using Sunday as first day of week for the Weekday function.

What you are actually calculating in that method is the day of the week as a number, then formatting that as a day based on that number interpreted as a date. Eg if your date is 1/2/2003 and you use the WEEKDAY function, this results in 7 (=Saturday). When you then format this as "dddd" you are actually getting the day name of the 7th day in Excel since its "epoch", ie 7/1/1900, which happens to be a Saturday*. This formula will break if someone opens it who has the option selected to use the 1904-based date system, as 1/1/1904 was not a Sunday, but a Friday. (yes I know hardly anyone uses that, but you don't want to build a solution which relies on that do you?)

You can make the formula shorter, faster and more robust simply by using

=TEXT(A1,"dddd")

You could of course just format the date cells themselves with a custom format as already suggested, depending on whether you really need this in a separate column or not. I often use date formats such as

ddd dd mmm yyyy

to give eg Sat 01 Feb 2003 so the date is explicit but shows the weekday name as well.

Using a second column and a TEXT function is essential if you want to use the weekday explicitly somewhere in a mail merge (for example), similarly for things like currencies and so on Excel > Word merging passes the actual underlying stored value rather than the on-screen formatted version, so regardless of the cell format, Word sees some horrible number. A true text field is passed 'as is' and displays properly in Word.

*in fact it is a Monday but Excel was written to match the incorrect dates in Lotus 1-2-3 which treated 1900 as a leap year when it is not.

share|improve this answer
    
I already upvoted it before your edit. Now it's even better. –  Jeroen Wiert Pluimers Oct 2 '12 at 17:26

Another possibility, depending on what you want to do with the date afterwards, is to set the cell's format to Custom: dddd

share|improve this answer
    
Superb! That does the trick, and is great for the situation where you don't want to use another column. Thanks –  Don Vince Sep 15 '09 at 23:21
    
Even if you want to use another column, you could do this and simply enter a formula like =A1 in the example from the first answer. –  Arjan Sep 16 '09 at 0:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.