Note
This variable is introduced since OceanBase Database V2.2.30.
Description
nls_timestamp_tz_format specifies the format to use when you convert a timestamp or TZ timestamp to a string, or when you implicitly convert a string to a timestamp or TZ timestamp.
Applicability
This variable is valid only in the Oracle mode of OceanBase Database.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | DD-MON-RR HH.MI.SSXFF AM TZR |
| Value range | N/A |
| Applicable scope | |
| Modifiable | Yes. It can be modified using the SET statement. |
| Affect the plan | Yes |
Considerations
This variable specifies the default date format used with the to_CHAR and to_timestamp_TZ functions, with commonly used value as YYYY-MM-DD HH24:MI:SS.FF TZR TZD.
Examples
Session level
obclient> SET nls_timestamp_tz_format='YYYY-MM-DD HH24:MI:SS.FF TZR TZD';Global level
obclient> SET GLOBAL nls_timestamp_tz_format='YYYY-MM-DD HH24:MI:SS.FF TZR TZD';