Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Convert a String to Date in a format (Month-YY)

Ravy12
7 - Meteor

Hi Experts,

 

Could you please let me know, how can I convert a string(in below table) to a date in the format as Month-Year.

 

I need the date format so that, I can use sort tool on the date field and it can sort data month wise , March-19 to June-19.

 

Below is the table with string value:

April-19
June-19
March-19
May-19

 

Regards, Ravi

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

using datetime help https://help.alteryx.com/current/Reference/Functions.htm you can create another date field as:

 

datetimeparse([Field1],"%B-%y")

you'll be able to sort on this field.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Thableaus
17 - Castor
17 - Castor

Hi @Ravy12 

 

Try this out

 

capture.PNG

 

Cheers,

NNaveen
5 - Atom

Eventhough you change the format, the data type is a string. How can you change it to date?

Labels