cyahahn
cyahahn

Reputation: 165

VARCHAR to DATE in Snowflake

Hello I need varchar to date.

My varchar looks like this:

This is my desired output:

Any ideas? Thanks in advance!

Here is the error I get when trying to_date:

enter image description here

Upvotes: 1

Views: 285

Answers (2)

cyahahn
cyahahn

Reputation: 165

Thanks for the solution, @Felipe Hoffa!

Solution: select to_date('Oct 2, 2020', 'MON DD, YYYY')

Upvotes: 0

Felipe Hoffa
Felipe Hoffa

Reputation: 59175

The format you should use is 'MON DD, YYYY':

select to_date('Oct 2, 2020', 'MON DD, YYYY')

Upvotes: 1

Related Questions