I am attempting to load a CSV file that has timestamps in it. I cannot figure out the proper Timestamp format to use to consume these timestamps correctly. Any suggestions would be greatly appreciated

I have tried "YYYY-MM-DD HH:MI A"; "YYYY-MM-DD HH:MI"; "YYYY-MM-DD HH:MM A"; "YYYY-MM-DD HH:MM".

 

Some examples of the values in the timestamp columns are :

2021-02-13 12:00 AM

2021-01-06 5:45 PM

0000-00-00 00:00:00

For me ''YYYY-MM-DD HH12:MI AM'' is working on Snowflake.

But your 0000-00-00 00:00:00 will cause issues because this has not the same format and is no valid date/timestamp.

So you have to replace this value using a dummy or NULL.

 

One solution could be to import the data as string and do the calculation/casting afterwards.

Loading it as VARCHAR and then dealing with the values later is the best way to go.