Alteryx Designer Desktop Discussions

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

Convert column date with multiple formats

beatrizmguerreiro
8 - Asteroid

Hello, 

 

I have a dataset with multiple date formats. I need to transform them into yyyy-mm-dd

 

I created a lookup table with all possible months abreviations that I'm using as to apply as "vlookup".

 

Date
15/07/2021
JUL', '07,', '2021'
2021-07-01
Čtvrtek 8. Dub 2021 4:11 odp. GMT+02:00
04/jun/21
01.07.2021
'02.07.2021'
['6', 'JUL', '2021']
27.6.2021
01.07.2021
28. 6. 2021
4.1.2021
  28 JUL 2021

 

Can you please help to standardize this?

2 REPLIES 2
Treyson
13 - Pulsar
13 - Pulsar

Alright. I think I have a solution for you, but it will require some work on your side.

 

I have attached a workflow with a batch macro that I created for you. Essentially what the macro is doing is processing your data one time for each format that is in a list of date formats (which I hardcoded in there based on the examples). Records that don't process don't pass through the workflow. I left a record ID field in there so you can notice that almost everything went through the process. The only one I can't figure out is this format (Čtvrtek 8. Dub 2021 4:11 odp. GMT+02:00).

 

Let me know if you have any other questions about this.

Treyson Marks
Managing Partner
DCG Analytics
Treyson
13 - Pulsar
13 - Pulsar

Also, here is some reading to help you understand what is happening here:

 

on batch macros:

https://community.alteryx.com/t5/Engine-Works/Batches-Be-Solvin/ba-p/444205

 

date time formats in Alteryx:

https://help.alteryx.com/20213/designer/datetime-functions

 

 

 

Treyson Marks
Managing Partner
DCG Analytics
Labels