XL: DATE(), TIME(), and NOW() Return Formatted Numbers

Last reviewed: February 2, 1998
Article ID: Q97098

The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0

SUMMARY

The "Microsoft Excel Function Reference," version 4.0 and the "Online Help" version 5.0, state that the functions DATE(), TIME(), and NOW() return the serial number for their respective input values. This information is misleading. While it is true that these values are assigned a serial number, these values are also automatically formatted with date and time formats.

In versions of Microsoft Excel prior to version 4.0, the value for these functions is returned as a serial number without number or date formatting.

MORE INFORMATION

In Microsoft Excel version 4.0 and 5.0, the functions DATE(), TIME(), and NOW() return serial values that are automatically formatted in a date or time format. This formatting occurs when you enter the formula and will override any previous cell formatting.

In versions of Microsoft Excel earlier that version 4.0, the value returned is formatted with the current cell format (the number format applied to the cell or the General format if the cell is not otherwise formatted).

The following table indicates the number formats used by each function:

       Microsoft              Microsoft               Microsoft
       Excel 2.x              Excel 3.0               Excel 4.0, 5.0
       -------------------------------------------------------------

DATE   Current cell format    Current cell format     m/d/yy
TIME   Current cell format    Current cell format     h:mm AM/PM
NOW    Current cell format    Current cell format     m/d/yy h:mm

In Microsoft Excel version 4.0 or 5.0, to apply a different number format to a formula containing one of the above functions, you must apply the new format after the formula has been entered.

REFERENCES

"Online Help," version 5.0 "Function Reference," version 4.0, pages 93-94, 290-291, 433-434


Additional query words: 4.0 4.00 4.0a 4.00a 5.0 5.00

Version : WINDOWS:4.0,4.0a,5.0; MACINTOSH:4.0,5.0
Platform : MACINTOSH WINDOWS
Issue type : kbdocerr


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: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.