In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more 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