SWITCHOFFSET_UDF (TIMESTAMP_TZ, VARCHAR)

Definition

This user-defined function (UDF) returns a new timestamp_tz with the adjusted time taken for parameter target_tz.

SWITCHOFFSET_UDF(source_timestamp TIMESTAMP_TZ, target_tz varchar)

Parameters

source_timestamp TIMESTAMP_TZ

The source timestamp to adjust.

target_tz varchar

The target time to take.

Returns

Returns the formatted target time as TIMESTAMP_TZ.

Usage example

Input:

SELECT SWITCHOFFSET_UDF(time_in_paris, '-0600') as time_in_costa_rica;

Output:

Last updated