![]() Previous |
![]() Next |
A datetime expression yields a value of a datetime data type. A datetime expression has the following syntax.
datetime_value_expr AT LOCAL |
TIME ZONE { ' [ + | - ] hh:mm' | DBTIMEZONE | 'time_zone_name' | expr }
A datetime_value_expr
can be a datetime value or a compound expression that yields a datetime value. Datetimes and intervals can be combined according to the rules defined in Table: Datetime Fields and Values. The three combinations that yield datetime values are valid in a datetime expression.
If you specify AT
LOCAL
, Oracle uses the current session time zone.
The settings for AT
TIME
ZONE
are interpreted as follows:
The string '(+|-)HH:MM'
specifies a time zone as an offset from UTC.
DBTIMEZONE
: Oracle uses the database time zone established (explicitly or by default) during Database creation.
SESSIONTIMEZONE
: Oracle uses the session time zone established by default or in the most recent ALTER
SESSION
statement.
time_zone_name
: Oracle returns the datetime_value_expr
in the time zone indicated by time_zone_name
. For a listing of valid time zone names, query the V$TIMEZONE_NAMES
dynamic performance view.
Note: Timezone region names are needed by the daylight savings feature. The region names are stored in the time zone files underoracore/zoneinfo . The server always uses the large time zone file corresponding to the version number recorded in sys.props$ . |
expr
: If expr
returns a character string with a valid time zone format, Oracle returns the input in that time zone. Otherwise, Oracle returns an error.