Calendar Definitions
NLS_TIMESTAMP_TZ_FORMAT Property
Description
Parameter type
String
Parameter scope
Initialization parameter, environment variable, and ALTER SESSION
Default value
Derived from NLS_TERRITORY
Range of values
Any valid datetime format mask
NLS_TIMESTAMP_TZ_FORMAT defines the default date format for the TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE datatypes. It is used with the TO_CHAR and TO_TIMESTAMP_TZ functions. You can specify the value of NLS_TIMESTAMP_TZ_FORMAT by setting it in the initialization parameter file. You can specify its value for a client as a client environment variable. Example 3–16
Setting NLS_TIMESTAMP_TZ_FORMAT
The format value must be surrounded by quotation marks. For example: NLS_TIMESTAMP_TZ_FORMAT
= 'YYYY-MM-DD HH:MI:SS.FF TZH:TZM'
The following example of the TO_TIMESTAMP_TZ function uses the format value that was specified for NLS_TIMESTAMP_TZ_FORMAT: SQL> SELECT TO_TIMESTAMP_TZ('2000-08-20, 05:00:00.55 America/Los_Angeles', 'yyyy-mm-dd hh:mi:ss.ff TZR') FROM DUAL;
You should see output similar to the following: TO_TIMESTAMP_TZ('2000-08-20,05:00:00.55AMERICA/LOS_ANGELES','YYYY-MM-DDHH:M --------------------------------------------------------------------------2000-08-20 05:00:00.550000000 -07:00
You can change the value of NLS_TIMESTAMP_TZ_FORMAT by: ■
■
Changing its value in the initialization parameter file and then restarting the instance Using the ALTER SESSION statement. See Also: ■
■
Oracle Database SQL Reference for more information about the TO_TIMESTAMP_TZ function and the ALTER SESSION statement "Choosing a Time Zone File" on page 4-15 for more information about time zones
Calendar Definitions This section includes the following topics: ■
Calendar Formats
■
NLS_CALENDAR
Setting Up a Globalization Support Environment
3-19