Alteryx Designer Desktop Discussions

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

Working with Dates: Convert Multiple Fields Simultaneously & Overwrite Existing Fields

DultonM
11 - Bolide

Hello Community! I posted an idea (here) awhile ago about ways to improve the DateTime tool. Specifically I am looking for a way to convert multiple fields at a time (rather than use multiple DateTime tools) as well as overwrite the old field with the converted one (instead of having a Select tool after every DateTime tool). @RodL mentioned that this could be done with the Multi-Field tool. This workaround has worked great, but it would be nice to have these features packaged into a tool (macro) that gives a similar feel to the DateTime tool and is easier to configure than the Multi-Field Formula. Anyone want to give this a shot?

14 REPLIES 14
Fz
8 - Asteroid

Hey, 

 

I managed to solve the first bug ( I change xls to xlsx ) but I had another problem : 

 

I try to change date from dd.mm.yy to   dd/mm/yy so fistable i use a DataTime parse Krew to change string into date and date into string. but the second DataTimeParse doesn't work ( the columns retrurns Null )

pgensler
8 - Asteroid

Hi @Fz 

 

Can you attach a workflow with the issue, or a small subset of what your data is, if possible? I've run into that same behavior before, and when I've tried to create a workflow to reproduce it with minimal tools, I cannot do so, which is puzzling. I've seen a similar behavior when there is at least 6+ of the tools on the canvas, and the only way I've been able to fix it is through re-positioning the tool to a new spot on the canvas, almost to reset or clear the cache the tool creates.

Fz
8 - Asteroid

Hello,

 

i join a part of my woorkflow. Firstable I use DataTime parse Krew to change string into date ( dd.MM.YY) to (YYYY.MM.dd). and I use the second DataTime parse Krew to convert  date YYYY.MM.dd to string  dd/MM/yy. but i don''t find the list of my date when i check date/Time format 

 

Capture.PNG

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Fz,

 

I'm a fan of DateTimeParse.  I would rather have complete control of the parsing instead of the use of the macro.  I am providing you with conditional logic to support the translation of multi-formats into a date as an example.  This single formula will convert data in either of your formats into an ISO date format.

 

IF
           REGEX_Match([Date Field], "\d{2}\.\d{2}\.\d{2}")
// mm.dd.yy
THEN DateTimeParse([Date Field],"%d.%m.%y")
ELSEIF
           REGEX_Match([Date Field], "\d{4}\.\d{2}\.\d{2}")
// YYYY.mm.dd
THEN DateTimeParse([Date Field],"%Y.%m.%d")
ELSE
Null()
ENDIF

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MaFer
5 - Atom

Hi Kenda.

I'm having issues adding your macro to my flow, an error appears stating "Error: DateTime Parse KReW (15): The Action "Tool #15" has an error: ParseError: Unterminated entity reference, 'T' at line 1 and column 1417 while processing "Action_UpdateRawXml"

 

Can you please help?

Labels