Alteryx Designer Desktop Discussions

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

Converting Multiple date types

7 - Meteor

Hello Alteryx Community,


I am relatively new to Alteryx so forgive me if this seems simple.


I have a large dataset (6m rows or so) with horribly inconsistent date formats, saved as V_Strings, which I need to convert to a standard format. The image attached gives you an example; it's mostly a combination of dd-mm-yyyy and dd-mm-yyyy, but we also have yyyy-mm-dd, numeric formats and who knows what else.


Does anyone have any tips about how to manage this? Everything I have tried so far has been fruitless.


Many Thanks!



12 - Quasar

Hi @Benk95


That's quite something!! The only way I can think of solving this is with regex. You'd have to filter your data, depending on which pattern it matches and then apply the formula to convert it and put it all back together. 


here is an example - you just need to create a stream for each date type. 



ACE Emeritus
ACE Emeritus

I attach another approach.




This time using formula tool to tidy up the input.


1. Remove the pure numbers and treat them as Excel dates (days since 31 Dec 1899)

2. Replace any / or \ with a -

3. Pad single digits with a 0

4. Finally try a date time parse on MM-DD-YYYY if not already in YYYY-MM-DD format

7 - Meteor

Thanks both, the first suggestion worked perfectly with a bit of trial and error.


I'd never heard of the REGEX functions, looks like I still have a lot to learn!



7 - Meteor

Hello - thank you for this suggestion. It was helpful, however, I am still having one issue with a date format. Similar to this user, I have multiple date formats, one of which is 09-APR-19.


I tried using this as the REGEX_Match, but it is coming back as false. I am new to REGEX so am not sure how to specify my parameters.


REGEX_Match([Date], '\d{2}-\d{3}-\d{2}')


Any help you can provide would be appreciated!