04 Oct 19 · npack · #Snowflake ·   Bookmark   ×

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');


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

allouJan 22 08:07

How to do if you have more than two date formats in your file and want to parse them into a copy syntax?

npackJan 23 05:01

Can you give an example

Community Software by Hittly