Converts a provided number to a date.
Sample Usage
TO_DATE(25405)
TO_DATE(A2)
TO_DATE(40826.4375)
Syntax
TO_DATE(value)
-
value- The argument or reference to a cell to be converted to a date.-
If
valueis a number or a reference to a cell containing a numeric value,TO_DATEreturnsvalueconverted to a date, interpretingvalueas number of days since December 30, 1899.- Negative values are interpreted as days before this date, and fractional values indicate time of day past midnight.
-
If
valueis not a number or a reference to a cell containing a numeric value,TO_DATEreturnsvaluewithout modification.
-
Notes
TO_DATEdoes not autoconvert number formats in the same way as direct entry into cells. Therefore,TO_DATE(10/10/2000)is interpreted asTO_DATE(0.0005), the quotient of 10 divided by 10 divided by 2000.TO_DATEis not as commonly used as DATE, which takes a year, month, and day in numeric format as inputs.TO_DATEis the inverse ofNas applied to a date, and equivalent to applying FormatNumber
Date time from the menu bar.
See Also
DATE: Converts a year, month, and day into a date.
TO_TEXT: Converts a provided numeric value to a text value.
TO_PURE_NUMBER: Converts a provided date/time, percentage, currency or other formatted numeric value to a pure number without formatting.
TO_PERCENT: Converts a provided number to a percentage.
TO_DOLLARS: Converts a provided number to a dollar value.
N: Returns the argument provided as a number.