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

ADD_TIME_ZONE_OFFSET(time, zone)

Arguments

Returns

timestamp


Examples

Transformation job example

SQL

CREATE JOB function_operator_example
    ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data 
  MAP_COLUMNS_BY_NAME
    SELECT time, zone,
        ADD_TIME_ZONE_OFFSET(time, zone) AS Output
    FROM default_glue_catalog.upsolver_samples.orders_raw_data
    LET time = timestamp '2018-03-10 08:55:12.456',
        zone = '+02:00'
    WHERE $commit_time BETWEEN run_start_time() AND run_end_time()
    LIMIT 1;

Query result

Last updated