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

Changing DateTime format for multiple fields

ashleyinman
8 - Asteroid

I have multiple fields that I want to change the datetime format that Alteryx autos to. I have about 10+ different date fields and would like to convert the dates all at once rather than put into multiple tools and I want the output to be a date not a string. 

 

This is what Alteryx is giving me

Received DateShip DatePromised DateScheduled Ship Date
2015-05-092015-05-152015-06-102015-05-20

 

 

This is what I want it to look like

Received DateShip DatePromised DateScheduled Ship Date
5/9/155/15/156/10/155/20/15
2 REPLIES 2
patrick_mcauliffe
14 - Magnetar
14 - Magnetar
You can use the Multi-Field tool. Change the settings at top to allow selection of all text and/or date field types (depending on what your field types are). Then write your date format formula using [Current Field] instead of a field name.
If you have multiple formats you're converting from you could write a conditional formula like "if regex_match([current field],'\d{2}\-\d{2}\-\d{4}') then..."

Alternate method:
Add a RecordID, then Transpose (with RecordID as the key) so that all dates are in a single field. Write a formula for that field and then CrossTab back into the original structure.
wale_ilori
9 - Comet

I typically do the alternate route. so much more intuitive.

Labels