todatetime
The todatetime
function converts the input into a datetime
value (Unix time in seconds).
To convert
datetime
(Unix time) into astring
, or vice versa, use thestrftime
andstrptime
functions.
Syntax
todatetime( Expression )
Arguments
- Expression: Expression that will be converted into
datetime
.
Returns
If the conversion is successful, the result will be a datetime
value, otherwise, the result will be
null
.
Example
todatetime("2015-12-24")
returns as 1450915200