Microsoft KB Archive/827327

= How to return a day of the week for a date in Excel =

Article ID: 827327

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Office Excel 2007
 * Microsoft Office Excel 2003
 * Microsoft Excel 2002 Standard Edition
 * Microsoft Excel 2000 Standard Edition

-



SUMMARY
This article describes how to return a day of the week for a date that is contained in a cell in Microsoft Excel.



MORE INFORMATION
To return a day of the week for a date, use one of the following methods.

Note Assume that cell A1 of your worksheet contains the date that you want to reference.

Method 1

 * In Microsoft Office Excel 2007, follow these steps:
 * In the cell that you want to return the day of the week, type =A1, and then press ENTER.
 * Select the cell with the returned date.
 * Click the Home tab.
 * Click Format Cells: Number in the Number group. This will open the Format Cells dialog box.
 * On the Number tab, click Date, and then select the date format that contains the day of the week in the Type list.
 * Click OK to close the Format Cells dialog box.
 * In Microsoft Office Excel 2003 and earlier versions of Excel, follow these steps:
 * In the cell that you want to return the day of the week, type =A1, and then press ENTER.
 * Select the cell that has the returned date.
 * On the Format menu, click Cells.
 * On the Number tab, click Date, and then select the date format that contains the day of the week in the Type list.
 * Click OK to close the Format Cells dialog box.

Method 2
If you want to return the day of the week as an abbreviation (for example, as Wed), type the following in the cell that you want to return the day of the week, and then press ENTER:

=text(a1,&quot;ddd&quot;)

If you want to return the day of the week as a whole word (for example, as Wednesday), type the following in the cell that you want to return the day of the week, and then press ENTER:

=text(a1,&quot;dddd&quot;)

Method 3
In the cell that you want to return the day of the week, type the following, and then press Enter:

=weekday(a1,1)

Note The second variable indicates the day of the week that the week begins. For example, the variable &quot;1&quot; indicates that the week starts on Sunday, while the variable &quot;2&quot; indicates that the week starts on Monday.

Dates that are earlier than March 1, 1900, may have inaccurate results.

