[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
DATEVALUE ( date-time-string )
Description: Computes the serial value of the date and/or time represented by the string date-time-string, taking into account the current date base value.
Arguments:
Name |
Type |
Description |
date-time-string |
The date and/or time whose serial value is to be computed. date-time-string can have any valid date and/or time format. If the year portion of date-time-string is omitted, the current year is used. Any time information in date-time-string shall be ignored. |
Return Type and Value: number – The serial value of the date and/or time represented by the string date-time-string.
However, if
• date-time-string is out of range for the current date base value, #VALUE! is returned.
• date-time-string does not represent a date, #VALUE! is returned.
[Example: When the current year is 2006,
DATEVALUE("2/1/2006")
DATEVALUE("01-Feb-2006 10:06 AM")
DATEVALUE("2006/2/1")
DATEVALUE("2006-2-1")
DATEVALUE("1-Feb")
all result in 38749 for the 1900 date base system, or 37287 for the 1904 date base system. end example]