Wenyi Yan
Wenyi Yan

Reputation: 85

convert Thu Sep 02 16:29:11 UTC 2021 to timestamp in snowflake

How to convert varchar Thu Sep 02 16:29:11 UTC 2021 to the timestamp in the snowflake database?

Upvotes: 0

Views: 47

Answers (1)

Mike Walton
Mike Walton

Reputation: 7369

SELECT TO_TIMESTAMP_NTZ('Thu Sep 02 16:29:11 UTC 2021', 'DY MON DD HH24:MI:SS UTC YYYY');

For reference, here is a link to the documentation on the "parts".

https://docs.snowflake.com/en/sql-reference/functions-conversion.html

Upvotes: 2

Related Questions