Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Create a Date based on a Text Field

hellyars
13 - Pulsar

Basic question.

 

This is my formula expression.   I am trying to create a field that turns Name into a Date.


But the results are Null and I see the Conv Error of "Year: 10-03-1995; is not a valid Date.'  ...for every year

 

Her eis a partial sample.  The elseif statements continued through FY19.

 

if [Name]="FY96" then '10-03-1995'

elseif [Name]="FY97" then '10-03-1996'

elseif [Name]="FY98" then '10-03-1997'

else null() endif

3 REPLIES 3
hellyars
13 - Pulsar

Never mind...

 

I forgot Alteryx likes YYYY-MM-DD

danilang
19 - Altair
19 - Altair

Hi @hellyars

 

Dates in Alteryx are always "yyyy-mm-dd" so your formula should be

 

if [Name]="FY96" then '"1995-03-10"

etc

 

Dan

 

 

 

bbak
9 - Comet

Hello Hellyars,

 

This is because your date needs to me in the yyyy-mm-dd format. I think that if you tweak this you should be good to go!

 

-Brandon

Labels