Purpose
This function combines a value of the TIMESTAMP data type with time zone information to form a value of the TIMESTAMP WITH TIME ZONE data type.
Syntax
FROM_TZ (timestamp_value,time_zone_value)
Parameters
Parameter |
Description |
|---|---|
| timestamp_value | A value of the TIMESTAMP data type. |
| time_zone_value | The time zone information. |
Return type
TIMESTAMP WITH TIME ZONE
Examples
Combine the timestamp value 2021-03-28 08:00:00 with the time zone +08:00 to form a value of the TIMESTAMP WITH TIME ZONE data type and return it.
obclient> SELECT FROM_TZ(TIMESTAMP '2021-03-28 08:00:00', '+08:00') FROM DUAL;
+-------------------------------------------------+
| FROM_TZ(TIMESTAMP'2021-03-2808:00:00','+08:00') |
+-------------------------------------------------+
| 28-MAR-21 08.00.00.000000000 AM +08:00 |
+-------------------------------------------------+
1 row in set
