parse_isotime¶
Description¶
Parse an ISO8601 (YYYY-MM-DDTHH:MM:SSZ) formatted string as a timestamp.
If its timezone is not UTC (Z), the offset must be represented as hour and minutes in ±hh:mm
format. The colon between hours and minutes is required, if needed, you may do this with replace_regex
.
Return type¶
timestamp
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
parse_isotime(value)
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
value |
string |
no |
no |
none |
Examples¶
make_col timestamp:parse_isotime("2022-09-19T18:38:59.059-05:00")
Make a new time column timestamp
from an ISO 8601 format date and time string.
make_col timestamp:parse_isotime(string_concat(year, "-", month, "-", day, "T", string(hour), ":", minute, ":", second, "-06:00"))
Make a new time column timestamp
from a constructed time string.
make_col timestamp_ms:parse_isotime("2024-05-23T19:40:50.859Z")
make_col timestamp_mus:parse_isotime("2024-05-23T19:40:50.859394Z")
make_col timestamp_ns:parse_isotime("2024-05-23T19:40:50.859394789Z")
Make new time columns from ISO 8601 format date and time strings with sub-second precision.
Aliases¶
parseisotime
(deprecated)