Alteryx Designer Desktop Discussions

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

Splitting Date Range Into Two Columns

anniegullo
6 - Meteoroid

Hey community, I'm still pretty new to Alteryx and I'm having some trouble. I have a column of date ranges that are formatted like this and I'm trying to separate them into two columns. A "Start Date" and an "End Date" column.

 

anniegullo_2-1596145430041.png

 

I used "Text To Column" and split the dates and removed white space. I was able to convert it to a string but need it to be a date string. As you can see by the image below it's not sorting the correctly because 2019 and 2020 are not sorting correctly. 

 
 
 

incorrect date sort.png

 
 
 
 
 
 

 

 

4 REPLIES 4
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @anniegullo,

 

You could use a multi-field formula tool with DateTimeParse(ToString([_CurrentField_]), '%M/%d/%Y') to parse the dates from their current format into a Date format (which you can subsequently successfully sort on)

 

Jonathan-Sherman_0-1596147479089.png

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

JosephSerpis
17 - Castor
17 - Castor

Hi @anniegullo you need to datetime parse your dates into the format Alteryx recognises as a date YYYY-MM-DD then it sort correctly. 

Hi @anniegullo 

 

You can use Datetime from "Parse" and configure it similar to the attached.

 

christine_assaad_0-1596147597339.png

 

anniegullo
6 - Meteoroid

Super helpful. Thank you!

Labels