Other Functions
at_zone
at_zone(value: date/time, zone: TEXT) → TIMESTAMP
Reads value as a model-zone wall-clock value and returns its wall-clock in the named zone (e.g. for day-bucketing: date(at_zone(o.ts, 'Europe/Berlin'))).
| Argument | Type |
|---|---|
| value | date/time |
| zone | TEXT |
Standard SQL: at_zone(…) — dialect-specific rendering
Example: date(at_zone(o.ts, 'Europe/Berlin'))
Sample query:
// at_zone: read a model-zone wall-clock value in another zone.
FIND check_temporal c
FETCH at_zone(c.ts_diff_base, 'America/New_York') in_new_york
to_utc
to_utc(value: date/time, zone: TEXT) → TIMESTAMP
Inverse of at_zone: reads value as a wall-clock in the named zone and returns the model-zone wall-clock value.
| Argument | Type |
|---|---|
| value | date/time |
| zone | TEXT |
Standard SQL: to_utc(…) — dialect-specific rendering
Example: to_utc(o.local_ts, 'Europe/Berlin')
Sample query:
// to_utc: read a zoned wall-clock value and return it in UTC.
FIND check_temporal c
FETCH to_utc(c.ts_diff_base, 'America/New_York') as_utc