FROM_ISO8601_TIMESTAMP
All functions > DATE AND TIME > FROM_ISO8601_TIMESTAMP
Returns a timestamp from the given ISO 8601 string.
Signatures
Returns: A TIMESTAMP value parsed from the ISO 8601 string
FROM_ISO8601_TIMESTAMP(string: VARCHAR) → TIMESTAMP sql
| Parameter | Type | Required | Description |
|---|---|---|---|
string | VARCHAR | Yes | An ISO 8601 formatted timestamp string |
Notes
- Parses ISO 8601 formatted datetime strings
- Format: YYYY-MM-DDTHH:MM:SS or YYYY-MM-DD HH:MM:SS
- Supports timezone information in the input string
- Returns NULL if the string is not valid ISO 8601 format
- Useful for converting standardized datetime strings to timestamps
Examples
FeatureQL
SELECT
f1 := FROM_ISO8601_TIMESTAMP('2024-03-15T10:30:00'), -- Parse ISO 8601 timestamp
f2 := FROM_ISO8601_TIMESTAMP('2024-12-25 14:45:00') -- Parse timestamp with space separator
;Result
| f1 TIMESTAMP | f2 TIMESTAMP |
|---|---|
| 2024-03-15T10:30:00 | 2024-12-25T14:45:00 |
On this page