Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

SHOW CURRENT_SESSION TIME FORMATS command

The SHOW CURRENT_SESSION TIME FORMATS command returns information about the date and time formats in the current session.

The following table describes the returned information:

Column Description
date_format The date format set in the session. The default value is %Y-%m-%d.
local_time_format The local time format set in the session. The default value is %H:%M:%S.
zoned_time_format The zoned time format set in the session. The default value is %H:%M:%S %z.
local_datetime_format The local datetime format set in the session. The default value is %Y-%m-%dT%H:%M:%S.
zoned_datetime_format The zoned datetime format set in the session. The default value is %Y-%m-%dT%H:%M:%S %z.

You can use SESSION SET to modify the local datetime format. Once the local datetime format is modified, other date and time formats are automatically updated if applicable.

Syntax

show_current_session_command
SHOW CURRENT_SESSION TIME FORMATS

show_current_session_command ::=
    'SHOW' 'CURRENT_SESSION' 'TIME' 'FORMATS'

Examples

Show the time formats in the current session

SHOW CURRENT_SESSION TIME FORMATS

Return:

+-------------+-------------------+-------------------+-----------------------+-----------------------+
| date_format | local_time_format | zoned_time_format | local_datetime_format | zoned_datetime_format |
+-------------+-------------------+-------------------+-----------------------+-----------------------+
| %Y-%m-%d    | %H:%M:%S          | %H:%M:%S %z       | %Y-%m-%dT%H:%M:%S     | %Y-%m-%dT%H:%M:%S %z  |
+-------------+-------------------+-------------------+-----------------------+-----------------------+