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

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
Kenda
16 - Nebula
16 - Nebula

Actually, @DultonM, I recently had the same thoughts! To solve this, I created a macro called the DateTime KReW macro (a spin-off of the CReW set of tools). I attached an example that first converts two incoming string fields into the Date format. I then added the macro again to convert the fields back to a string field, just to show you how the macro can work each way. This new macro can do everything that the existing tools does, but adds the capability of converting multiple fields at once and not requiring the generation of new fields. Hope this helps!

DultonM
11 - Bolide

Super slick @Kenda!! Your macro is a wonderful implementation of the two enhancements I had in mind for the DateTime tool. Time to remove the default DateTime tool from my toolbar and put this macro there instead!

KaneG
Alteryx Alumni (Retired)
pgensler
8 - Asteroid

For completeness, I'm not sure if the Date Time Parse KReW Macro works on two separate fields...check out this flow, and let me know your thoughts.

DultonM
11 - Bolide

Hi @pgensler,

 

Could you please attach a .yxzp of the workflow so we can see exactly how you configured everything? The problem with just the .yxmd is that it doesn't include the macro and the macro's configuration.

 

To make a .yxzp, first have the workflow (configured in the way such that you experience your error) open and saved. Then go to Options and select "Export Workflow". Attach the newly created .yxzp to this post and we'll be able to open it up and see the workflow with the macro configured the way you see it.

 

Thanks!

pgensler
8 - Asteroid

Sure try this, and let me know what you think.

Kenda
16 - Nebula
16 - Nebula

Hey Peter - When you exported your workflow, did you include the macros in the .yxzp? Below I included an example of my screen for a workflow that had one macro in it and circled the check boxes you need to have checked in order to include the macro when exporting. Just make sure you have all the necessary boxes checked before exporting.

Capture.PNG

pgensler
8 - Asteroid

@Kenda my apologies, I was not sure if that made a difference, try using this workflow:

Fz
8 - Asteroid

Hey,

 Thank you for the solution. I am trying to use  the macro but I have a error message : Erreur openning conncect string : Microsoft JET Database Engine   :  Link does not have a valide path .

 

Plz any help Thank you !!!

Labels