Note
This variable was introduced in OceanBase Database V2.2.30.
Description
nls_date_format specifies the format of converting a date to a string and the format of implicitly converting a string to a date.
Applicability
This variable is applicable to only OceanBase Database in Oracle mode.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | DD-MON-RR |
| Value range | N/A |
| Effective scope | |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
| Plan generation affected | Yes |
Considerations
The value of the start_date parameter is of the DATE data type. The format model specified by the NLS_DATE_FORMAT variable is used to convert the value of the start_date parameter to text and then send the conversion result to the SQL text. A datetime format model can consist of text enclosed in double quotation marks (").
Examples
Set the variable at the session level
obclient> SET nls_date_format='DD-MON-RR';Set the variable at the global level
obclient> SET GLOBAL nls_date_format='DD-MON-RR';