Note
This variable is available starting with V2.2.30.
Description
nls_timestamp_tz_format specifies the format for converting a TIMESTAMP WITH TIME ZONE value to a string and for implicitly converting a string to a TIMESTAMP WITH TIME ZONE value.
Applicability
This variable is applicable only to OceanBase Database in Oracle-compatible mode.
Privilege requirements
Query variables
Global level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) to view the value of a global system variable.Session level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle-compatible mode) to view the value of a session system variable.
Modify variables
Global level
systenants can directly modify the value of a global system variable.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenants and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | varchar |
| Default value | DD-MON-RR HH.MI.SSXFF AM TZR |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage
This variable specifies the default time zone format for the to_CHAR and to_timestamp_TZ functions. The commonly used value is 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';