Name

DATE

Synopsis

Use this function to create an actual date by combining year, month, and day values. In order to use this function you must specify all three arguments (Year, Month, and Day); if you omit one, Excel returns an error. When you use this function you can either type in the values for the year, month, and day, such as 12/14/1999 or you can get the values for the Year, Month, and Day arguments from different cells and create a date such as Date(A1, A2, A3). Cell A1 contains the year value, A2 contains the month value, and A3 contains the day value.

Note

The value that you specify for the Month or Day argument of DAY must be an integer between -32,768 and 32,766. If the value is positive, that number of days or months is added to the date. If the value is negative Excel subtracts the specified value from the date.

To Calculate

=DATE(Year, Month, Day)

The following arguments are required:

Year

Although Excel will accept a year value of one to four digits (between and 9999), I would recommend always specifying a four-digit year to ensure you get the proper date. As outlined in Table 13-1, DATE interprets a two-digit year differently than Excel does when it is typed directly into a worksheet. For example, if you type the date 12/23/01 into a cell of your worksheet, Excel interprets the date as December 23, 2001; if you have the function DATE(01, 12, 23), Excel returns the date December 23, 1901, and formats it based on the cell’s current formatting.

Also, be aware of the differences ...

Get Excel 2000 in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.