DATEVALUE

DATEVALUE(date_text)

Returns the date serial number given a date in text format.

date_textThe text string that represents the date.

REMARKS
* If "date_text" contains any time information, it is ignored.
* If "date_text" is not a valid date, then #VALUE! is returned.
* If "date_text" is a cell reference, the value in the cell must be text.
* If the year portion of "date_text" is left blank, the current year is used.
* Acceptable date formats will vary from system to system and will also depend on the users settings.
* Most functions will automatically convert date strings to serial numbers.
* The date format can be any of those found on the "Format Cells" dialog box.
* You can use the DATE function to return the date serial number given a YEAR, MONTH, DAY.
* You can use the EDATE function to return a certain number of months before or after a date.
* You can use the NUMBERVALUE function to return the number that a text string represents.
* You can use the TEXT function to return a number as a formatted text string.
* You can use the TIMEVALUE function to return the time as a decimal given a time in text format.
* You can use the TODAY function to return the serial number of the current system date.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=DATEVALUE(B1) = 4474301 July 2022
2=DATEVALUE("22-AUG-2022") = 44795 
3=DATEVALUE("22 August 2022") = 44795 
4=DATEVALUE("2002/02/23") = 37310 
5=DATEVALUE("1-JUL") = 45474 
6=DATEVALUE("1 Jul 2022") = 44743 
7=DATEVALUE(TEXT(TODAY(), "dd/mm/yy")) = 45597 
8=DATEVALUE("8/22/2022") = #VALUE! 

1 - What is the date serial number for the text string displayed in cell "B1".
2 - What is the date serial number for the text string "22-AUG-2020".
3 - What is the date serial number for the text string "22 August 2020".
4 - What is the date serial number for the text string "2002/02/12".
5 - What is the date serial number for the text string "1-JUL". The current year is used.
6 - What is the date serial number for the text string "1 July 2019".
7 - What is the date serial number for todays date, formatted as "dd/mm/yy".
8 - What is the date serial number for the text string "8/22/2020". The UK Date format is "day/month/year" so 22 is not a valid month.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top