Excel: DAY Function Does Not Display Expected Date

Last reviewed: October 31, 1994
Article ID: Q47570

SUMMARY

Formatting a Microsoft Excel cell containing the formula "=DAY(date)" with the number format "dddd" does not return the day of the week of the date entered in the formula.

For example, if cell A1 contains the date 10/1/88 (which is a Sunday), the result of DAY(A1) is the number 1, which represents the first day of the week, or Sunday.

If the cell is then formatted as "dddd", Excel sees the number 1 as the serial number 1, which is January 1, 1904, or a Saturday.

To return the day of the week of the date contained within the cell, use the format "dddd" without using the DAY function on the date.

MORE INFORMATION

The DAY function returns a number representing the day of the week of a certain date. For example, if a date falls on a Sunday, the DAY function returns the number 1. If the date falls on a Monday, DAY returns a 2, and so on, up to 7, which is Saturday.

The cell format "dddd" displays only the day of the week in a cell containing a date. For example, if the date represented by the serial number in a cell is on a Sunday, the cell would display "Sunday".

For more information on day number formatting, see page 179 of the "Microsoft Excel User's Guide" version 3.0 manual. For more information on the DAY function, see page 46 of the "Microsoft Excel Function Reference" version 3.0 manual.


KBCategory: kbother
KBSubcategory:

Additional reference words: 1.00 1.03 1.04 1.06 1.50 2.20 3.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 31, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.