w3resource

Oracle TZ_OFFSET function

Description

The TZ_OFFSET() is used to get the time zone offset corresponding to the argument based on the date the statement is executed.

Syntax:

TZ_OFFSET({ 'time_zone_name'
          | '{ + | - } hh : mi'
          | SESSIONTIMEZONE
          | DBTMEZONE
          }
         )

Parameters:

Name Description
TZ_OFFSET A valid time zone. You can enter a valid time zone name, a time zone offset from UTC, or the keyword SESSIONTIMEZONE or DBTIMEZONE.
See the valid Time Zone Region Names list from here.

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

Example: Oracle TZ_OFFSET function

The following statement returns the time zone offset of the Africa/Abidjan time zone from UTC:

SQL> SELECT TZ_OFFSET('Africa/Abidjan') FROM DUAL;

Sample Output:

TZ_OFFS
-------
+00:00

Previous: TRUNC(date)
Next: Oracle-character-functions Introduction



Share this Tutorial / Exercise on : Facebook and Twitter