Note
This variable was introduced in 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 applicable to only OceanBase Database in Oracle mode.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | DD-MON-RR HH.MI.SSXFF AM TZR |
| Value range | N/A |
| Effective scope | |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
| Plan generation affected | Yes |
Considerations
This variable specifies the default date format used for the to_CHAR and to_timestamp_TZ functions. The commonly used format is YYYY-MM-DD HH24:MI:SS.FF TZR TZD.
Examples
Set the variable at the session level
obclient> SET nls_timestamp_tz_format='YYYY-MM-DD HH24:MI:SS.FF TZR TZD';Set the variable at the global level
obclient> SET GLOBAL nls_timestamp_tz_format='YYYY-MM-DD HH24:MI:SS.FF TZR TZD';