Microsoft KB Archive/104952

= Microsoft Knowledge Base =

Excel: DATE Function Returns #NUM! Error Value
Last reviewed: September 12, 1996

Article ID: Q104952

The information in this article applies to:


 * Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
 * Microsoft Excel for the Macintosh, version 4.0, 5.0

SUMMARY
The DATE function in Microsoft Excel will return a #NUM! error value if the Alternate Expression Evaluation option is enabled and if the month argument is greater than twelve or the day argument is greater than the number of days in the specified month.

This limitation of the DATE function is not documented in the "Function Reference," version 4.0.

MORE INFORMATION
The syntax of the DATE function is as follows:

DATE(year,month,day) By design, the DATE function will return an appropriate date when the month argument is greater than twelve and/or the day argument is greater than the number of days in the specified month. For example, DATE(90,14,2) returns February 2, 1991, and DATE(91,1,35) returns February 4, 1991.

However, this feature of the DATE function is not available when the Alternate Expression Evaluation check box is selected (to select this option, choose the Calculation command from the Options menu). If alternate expression evaluation is enabled, the above examples will return the #NUM! error value.