Excel: DAY Function Does Not Display Expected DateLast reviewed: October 31, 1994Article ID: Q47570 |
SUMMARYFormatting 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 INFORMATIONThe 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |