FROM_TZ

The FROM_TZ function converts a timestamp value and a time zone to a TIMESTAMP_TZ value.

Return Values

TIMESTAMP_TZ

Syntax

FROM_TZ (timestamp_value , time_zone_value)

Arguments

timestamp_value

A text expression with a TIMESTAMP data type.

time_zone_value

A text expression that returns a string in the format TZH:TZM or in TZR with optional TZD format.

See also:

See "Datetime Expressions" for information on specifying timestamp and time zone values.

Examples

Example 7-102 Creating a TIMESTAMP_TZ Value from a Timestamp Value and a Time Zone

DEFINE mytimestamp VARIABLE TIMESTAMP
DEFINE mytimezone VARIABLE TEXT
DEFINE mytimestamptz VARIABLE TIMESTAMP_TZ
mytimestamp = '26-MAR-06'
mytimezone = '-04:00'
mytimestamptz = FROM_TZ (mytimestamp mytimezone)
REPORT mytimestamptz
 
MYTIMESTAMPTZ
------------------------------
  26-MAR-06 12.00.00 AM -04:00