ADD_TIME_ZONE_OFFSET
Add a timezone offset to a date. The timezone offset can be in any of the standard formats accepted by Java's ZoneId.of
method (America/New_York, +02:00, etc.)
Syntax
Arguments
Name | Type | Description | Default Value |
---|---|---|---|
time | timestamp | ||
zone | string |
Returns
timestamp
Examples
time | zone | Output |
---|---|---|
timestamp '2018-03-10 08:55:12.456' | '+02:00' | timestamp '2018-03-10 10:55:12.456' |
timestamp '2018-03-10 08:55:12.456' | 'America/New_York' | timestamp '2018-03-10 03:55:12.456' |
timestamp '2018-03-10 08:55:12.456' | '' | null |
timestamp '2018-03-10 08:55:12.456' | 'Invalid Zone Id' | null |
Transformation job example
SQL
Query result
time | zone | Output |
---|---|---|
timestamp '2018-03-10 08:55:12.456' | '+02:00' | timestamp '2018-03-10 10:55:12.456' |
Last updated