We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert V_WString to date in DB

myfriend
6 - Meteoroid

Hello I have a in DB column that is a V_W string.  I would like to convert it to a date.  The database I'm using is snowflake.

When I use the formula cast ("ERDAT" as date.) before the formula a field is yyyymmdd - 20130925.  The output is 1970-08-21, which is wrong. 

1 REPLY 1
phottovy
13 - Pulsar
13 - Pulsar

Hi @myfriend 

 

You should be able to use the TO_DATE function. Try something like this:

 

TO_DATE(ERDAT, 'YYYYMMDD')

 

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

Labels
Top Solution Authors