Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Converting YYYY string to date format?

BradO
5 - Atom

Hi All,

 

I'm running into a snag with one of my workflows that publishes to tableau server directly.  I have a year field that is the result of transforming several columns and performing a LEFT function to pull out the year.  Is there an easy way to convert a string YYYY into a date.  I am fine with plugging in 01/01 or 12/31 as I am only reporting at the year level in tableau.

 

Thanks in advance for the help!

 

Example:

 

2018-03-28_17-27-10.png

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

Yes, you can simply use a formula tool, creating a new field and select 'date' as the type then use something like.

[Year Field]+"-01-01"

IanCo
Alteryx Alumni (Retired)

Hi Brad,

 

Yes. Use the formula tool and write: "01-01-"+[Year]. Combine that with a Select tool to change the Type to Date and you should be ready to publish to a tde.

 

Ian

BradO
5 - Atom

Thank you Sir!

Labels