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

nVector

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




allou22-Jan-20

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

nVector23-Jan-20

Can you give an example