community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

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

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

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.
Alteryx Certified Partner
Alteryx Certified Partner

Hi @Ravy12 

 

Try this out

 

capture.PNG

 

Cheers,

Labels