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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More
SOLVED

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

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?

Pulsar
Pulsar

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!

Bolide

Super slick @BarnesK!! 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!

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

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!

Asteroid

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

Pulsar
Pulsar

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

Asteroid

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

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