datestyle - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Values (default in bold)

Format specification (ISO, Postgres, SQL, or German), and year/month/day ordering (DMY, MDY, YMD).

  • ISO – uses the datestyle of YYYY-MM-DD HH:MM:SS.

  • Postgres – uses the datestyle of MM-DD HH:MM:SS YYYY.

  • SQL – uses the datestyle of MM-DD-YYYY HH:MM:SS.

  • German – uses the datestyle of DD-MM-YYYY HH:MM:SS.


Sets the display format for date and time values and also the rules for interpreting ambiguous date input values. The string contains two parameters that you can change separately or together.


show datestyle; DateStyle ----------- ISO, MDY (1 row) set datestyle to 'SQL,DMY';