parseDateTime
parseDateTime(
arg,preferDayFirst?,lenientDayMonthOrder?):number|FormulaError
Parse a single value (string or reference to a string) into a number representing an Excel datetime.
Parameters
Section titled “Parameters”a single value to convert
string | FormulaError | Reference
preferDayFirst?
Section titled “preferDayFirst?”boolean
resolve ambiguous-order dates with the day-first order (month, day, year). Example: interpret 4/3/21 as March 4th. Default is false, i.e. month-first, i.e. April 3rd in this example.
lenientDayMonthOrder?
Section titled “lenientDayMonthOrder?”boolean
return date rather than error when the value is valid as month-first and not as day-first, but preferMonthFirst is false --- or vice versa. Default is false (i.e. be strict, return error even if value can be parsed in the non-preferred day/month order style).
Returns
Section titled “Returns”number | FormulaError