Snowflake snippets

How to change the output format of DateTime in a session

If you want, you can change the DateTime output format during a session using the statement.

SELECT CURRENT_DATE();
Snowflake snippet 17

ALTER SESSION SET DATE_OUTPUT_FORMAT = 'DD MM YYYY';
Snowflake snippet 18

SELECT CURRENT_DATE();
Snowflake snippet 19

If you want to query which form is set in this session you can find the value of the parameter using this query

SHOW PARAMETERS LIKE 'DATE_OUTPUT_FORMAT' 
IN SESSION;
Snowflake snippet 20

Nicola Simboli

Nicola Simboli Senior Analytics Engineer

15+ years across SaaS, enterprise and consulting. Focused on scalable data platforms, metric reliability and analytics systems that teams actually use.

Back to Snowflake cookbook page