Convert a date string to a date value
If you have any dates entered as a string (e.g. "01 Jul 2022") you can convert it to an actual date using the DATEVALUE function.
This function returns the date serial number given a date in text format.
Exactly which formula you use will depend on your Regional Format.
If you regional format is set to English (United States) you need to use a different formula.
Regional Format - English (United Kingdom)
|
1 - Displays the current date. Custom format "dddd dd mmmm yyyy".
2 - Displays the current date and time. Custom format "dddd dd mmmm yyyy hh:mm:ss".
3 - Converts the date in cell "A1" to a text string with the format "yyyymmdd".
4 - Converts the text string in cell "A3" to its corresponding date serial number. Custom format "dddd, dd mmmm, yyyy".
5 - Contains the text string "20200523".
6 - Converts the text string in cell "A5" to its corresponding date serial number. Custom format "dddd, dd mmmm, yyyy".
7 - Contains the text string "20200208".
8 - Converts the text string in cell "A7" to its corresponding date serial number. Custom format "dddd, dd mmmm, yyyy".
Regional Format - English (United States)
|
1 - Contains the text string "20200715".
2 - Converts the text string in cell "A1" to its corresponding date serial number. Custom format "dddd, dd mmmm, yyyy".
3 - Contains the text string "20200523".
4 - Converts the text string in cell "A3" to its corresponding date serial number. Custom format "dddd, dd mmmm, yyyy".
5 - Contains the text string "20200208".
6 - Converts the text string in cell "A5" to its corresponding date serial number. Custom format "dddd, dd mmmm, yyyy".
Built-in Functions
DATEVALUE - The date serial number given a date in text format.
LEFT - The first or left most characters in a text string.
MID - The characters from the middle of a text string.
NOW - The date serial number of the current system date and time.
RIGHT - The last or right most characters in a text string.
TEXT - The number as a formatted text string.
TODAY - The date serial number representing today's date.
Related Formulas
Return a date in US date format
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top