DATEVALUE

Returns the serial number of the date represented by date_text. Use DATEVALUE to convert a date represented by text to a serial number.

Syntax

DATEVALUE(date_text)

Date_text   is text that returns a date in a Microsoft Excel date format. Using the default date system in Microsoft Excel for Windows, date_text must represent a date from January 1, 1900, to December 31, 9999. Using the default date system in Microsoft Excel for the Macintosh, date_text must represent a date from January 1, 1904, to December 31, 9999. DATEVALUE returns the #VALUE! error value if date_text is out of this range.

If the year portion of date_text is omitted, DATEVALUE uses the current year from your computer's built-in clock. Time information in date_text is ignored.

Remarks

Examples

The following examples use the 1900 date system:

DATEVALUE("8/22/55") equals 20323

DATEVALUE("22-AUG-55") equals 20323

Assuming your computer's built-in clock is set to 1993 and you are using the 1900 date system:

DATEVALUE("5-JUL") equals 34155