Related Topics: | ||
Description: Converts the specified date to a serial number. For example, the function returns 40777 if you enter "8/22/2011" or "22-AUG-2011."
Syntax: DATEVALUE(Date_text)
Date_text is text that represents a date in a date format. For example, "1/30/2011" or "30-Jan-2011" are text strings within quotation marks that represent dates. Date_text must represent a date from January 1, 1900, to December 31, 9999. Note that the Date_text must be in quotation marks.
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:
The software stores dates as sequential serial numbers so they can be used in calculations. January 1, 1900 is serial number 1, and January 1, 2011 is serial number 40544 because it is 40,544 days after January 1, 1900. (See the NOW function.)
Most functions automatically convert date values to serial numbers.
Example:
DATEVALUE("8/22/2011") = 40777 [the serial number of the text date]
DATEVALUE("22-AUG-2011") = 40777 [the serial number of the text date]
DATEVALUE("2008/02/23") = 39501 [the serial number of the text date]
Assuming your computer's built-in clock is set to 2011:
DATEVALUE("5-JUL") = 40729 [the serial number of the text date]
© 1992-2015. ReliaSoft Corporation. ALL RIGHTS RESERVED.