JSON_EXTRACT_TIMESTAMP
Overview
Extracts a value from a JSON object by path and returns it as TIMESTAMP (with time zone). Returns NULL if the path does not exist or the value is null.
Syntax
Parameters
<json>: JSON type, the source data. Strings must first be converted usingPARSE_JSON.<path>: STRING type, a JSONPath expression such as'$.field'.
The timestamp value in the JSON must be a string in 'YYYY-MM-DD HH:MM:SS' format. The value is interpreted using the local time zone at extraction time. Use JSON_EXTRACT_TIMESTAMP_NTZ when time zone semantics are not needed.
Examples
Related Documentation
- JSON_EXTRACT_TIMESTAMP_NTZ — timestamp extraction without time zone
- JSON_EXTRACT_DATE
- PARSE_JSON
