Free Trial

Alteryx Designer Desktop Discussions

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

How to change String version to Date version?

wendyzjy
8 - Asteroid

input column Date type is String( if use select to change from string to Date, shows Null)

They format of the Date in the input file is yyyy-mm(eg. 2022-02)

How to change the string format to a date format and sort the 12 months of 6 month earlier than current month?(eg, sort out 2020-07 to 2021-06, suppose the current month is 2022-02) ?

11 REPLIES 11
atcodedog05
22 - Nova
22 - Nova

Hi @wendyzjy 

You can convert it to date like this. 

atcodedog05_0-1646565334613.png

 

Sorry I didn't understand the rest of your requirements.

 

Hope this helps : )

 

wendyzjy
8 - Asteroid

This looks really smart and so quick! My last question is I want to sort 12 months among all the months, the 12 month ends from 6 months comparing with current month.

suppose current month is 2022-02, i will need below months. Is there a way to make this possible? 

wendyzjy_0-1646565911958.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @wendyzjy 

 

Is this what you are looking for

atcodedog05_0-1646566362314.png

 

Hope this helps : )

wendyzjy
8 - Asteroid

thank you so much for your prompt reply, actually from the input file, there are hundreds of months, i would like to filter out the specific months with the logic described and delete the rest, any suggestions?

 

atcodedog05
22 - Nova
22 - Nova

Hi @wendyzjy 

Can you provide some sample input and expected output It will help us get a better understanding of the usecase.

We will be happy to help : )

wendyzjy
8 - Asteroid

Absolutly!

I use excel to create a demo:

wendyzjy_0-1646568054214.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @wendyzjy 

 

Is this what you are looking for

 

atcodedog05_0-1646568693888.png

 

Hope this helps : )

 

wendyzjy
8 - Asteroid

oh, i thought i got the answer with your workflow attached! Thank you so much!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @wendyzjy 

Cheers and have a nice day!

Labels
Top Solution Authors