04 Oct 19 · npack ·       Add to Favorites  

TO DATE syntax in Snowflake

Converts an input expression to a date:

It auto-recognizes, YYYY-MM-DD format:

select to_date('2013-05-17');

for other formats, specify explicitly

SELECT TO_DATE('20190927','YYYYMMDD') as parsed_date;
select to_date('2012.07.23', 'YYYY.MM.DD');
select to_date('02/14/2014', 'MM/DD/YYYY');

npack

posted on 04 Oct 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds

Copied