w3resource

Oracle FROM_TZ function

Convert a timestamp value to a timestamp with time zone in Oracle

The FROM_TZ() function is used to convert a timestamp value and a time zone to a TIMESTAMP WITH TIME ZONE value.

Syntax:

FROM_TZ (timestamp_value, time_zone_value)

Parameters

Name Description
timestamp_value The value to convert to a TIMESTAMP with TIME ZONE value.
time_zone_value Convert timestamp_value to a TIMESTAMP with TIME ZONE value.

Applies to:
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i

Pictorial Presentation

Pictorial Presentation of Oracle EXTRACT function

Example: Oracle FROM_TZ () function

The following statement returns a timestamp value to TIMESTAMP with TIME ZONE :

SQL> SELECT FROM_TZ(TIMESTAMP '2015-04-28 09:00:00', '4:00')
  2  FROM DUAL;

Sample Output:

FROM_TZ(TIMESTAMP'2015-04-2809:00:00','4:00')
---------------------------------------------------------------------------
28-APR-15 09.00.00.000000000 AM +04:00

Previous: EXTRACT(datetime)
Next: LAST_DAY



Share this Tutorial / Exercise on : Facebook and Twitter