Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
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

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

Highlighted
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

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

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 reboot. Order shall return.
Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @Ravy12 

 

Try this out

 

capture.PNG

 

Cheers,

Highlighted
5 - Atom

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

Labels