w3resource

Oracle DBTIMEZONE function

How to get the value of the Database time zone?

DBTIMEZONE function returns the value of the database time zone.

Parameters:

No parameters or arguments.

Syntax:

DBTIMEZONE

Return type:

The return type is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time zone region name. It depends on how the user specified the database time zone value in the most recent CREATE DATABASE or ALTER DATABASE statement.

Pictorial Presentation

Pictorial Presentation of Oracle DBTIMEZONE function

Example: Oracle DBTIMEZONE function

The following statement assumes that the database time zone is set to UTC time zone:

SQL> SELECT DBTIMEZONE FROM DUAL;

Sample Output:

DBTIMEZONE
-------------
+00:00

Previous: CURRENT_TIMESTAMP
Next: EXTRACT(datetime)



Share this Tutorial / Exercise on : Facebook and Twitter