DATEVALUE
The DATEVALUE function returns a date/time value for a given date string. This function is provided for compatibility with other spreadsheet apps.
DATEVALUE(date-text)
date-text: The date string to be converted or a date/time value. If date-text is not a valid date, an error is returned.
Examples |
---|
If cell B1 contains the date/time value Aug 2, 1979 06:30 am and cell C1 contains 10/16/2008 formatted as text: =DATEVALUE(B1) returns Aug 2, 1979, and is treated as a date value if referenced in other formulas. The value returned is formatted according to the current cell format. A cell formatted as Automatic uses the date format specified in your Language & Region settings (in System Preferences in macOS 12 and earlier, System Settings in macOS 13 and later, and Settings in iOS and iPadOS). =DATEVALUE(C1) returns Oct 16, 2008. =DATEVALUE("12/29/1979") returns Dec 29, 1979. |