nls_timestamp_format

2025-12-01 14:37:59  Updated

Note

This variable is introduced since OceanBase Database V2.2.30.

Description

nls_timestamp_format specifies the format to use when you convert a timestamp or LTZ timestamp to a string, or when you implicitly convert a string to a timestamp or LTZ 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
Value range N/A
Applicable scope
  • Global
  • Session
  • Modifiable Yes. It can be modified using the SET statement.

    Considerations

    This variable specifies the default date format used with the to_CHAR and to_TIMESTAMP functions, with commonly used value as YYYY-MM-DD HH24:MI:SS.FF.

    Examples

    • Session level

      obclient> SET nls_timestamp_format='YYYY-MM-DD HH24:MI:SS.FF';
      
    • Global level

      obclient> SET GLOBAL nls_timestamp_format='YYYY-MM-DD HH24:MI:SS.FF';
      

    References

    Contact Us