ToTime
ToTime( value )
ToTime( value )
ToTime( value )
ToTime( value )
to_time( value )
ToTime( value )
Description
The ToTime
function converts a value to a timestamp, if
possible.
Attempting to convert a value to a timestamp which has no timestamp representation results in an "invalid argument" error.
Returns
A Timestamp created by interpreting value
.
Examples
The following query converts the string "2015-02-20T06:30:00Z" to a timestamp:
FaunaTime(2015-02-20T06:30:00Z)
{0 63560010600 <nil>}
2015-02-20T06:30:00Z
Time("2020-07-06T12:34:56.789Z")
FaunaTime('2015-02-20T06:30:00Z')
Time("2020-07-06T12:34:56.789Z")
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!