
Description: Converts the specified date to a serial number. For example, the function returns 43699 if you enter "8/22/2019" or "22-AUG-2019."
Syntax: DATEVALUE(Date_text)
Date_text is text that represents a date in a date format. For example, "1/30/2019" or "30-Jan-2019" 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, 2019 is serial number 43466 because it is 43,466 days after January 1, 1900. (See the NOW function.)
Most functions automatically convert date values to serial numbers.
Example:
DATEVALUE("8/22/2019") = 43699 [the serial number of the text date]
DATEVALUE("22-AUG-2019") = 43699 [the serial number of the text date]
DATEVALUE("2019/02/23") = 39501 [the serial number of the text date]
Assuming your computer's built-in clock is set to 2018:
DATEVALUE("5-JUL") = 43286 [the serial number of the text date]
© 1992-2019. HBM Prenscia Inc. ALL RIGHTS RESERVED.
| E-mail Link |