Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Converting a year (YYYY) in string format, to a date field

Highlighted
8 - Asteroid

Hi everyone

 

Within my table I have the following Year column and I want to convert it to the Date column:

 

Year (string format)Date (date format) (desired format)
202001/01/2020
202101/01/2021
202201/01/2022
202301/01/2023
202401/01/2024

 

I want to do this so I can utilise line chart visualisations in Power BI. 

 

I've tried using the DateTime tool but can't locate an incoming string YYYY option to convert. I'm thinking the Formula tool can resolve this and help with formula type would be appreciated!

 

Can anyone help?

 

Thanks
KA

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@arundaka01 ,

 

 how about trying:

"01/01/" + [year]

or try

 

 

"01/01/" + ToString([year])

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
12 - Quasar

Hello @arundaka01 ,

 

see example in the workflow.

 

Hope it helps.

 

If you are looking for 01/01/2020 or similar as a date output, I am afraid this is not possible.

 

Dates in Altyrex are all set to yyyy-mm-dd format. 

Highlighted
8 - Asteroid

Thanks @ImadZidan 

 

I've just learnt that this is the case when I've converted it to a date format with DateTime! 

 

I can now however complete linear visualisations in Power BI. thanks @MarqueeCrew 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@arundaka01  You're quite welcome

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels