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.

Cleanse macro changing date type from string to date

lamiah13
6 - Meteoroid

Hi all,

 

I was recently introduced to the cleanse macro for data cleaning and it has done wonders for standardizing all my dates. However, I need to change the type from a string to date and I am wondering what the best way to do this is?

 

Thank you in advance. 

3 REPLIES 3
Maskell_Rascal
13 - Pulsar

Hi @lamiah13 

 

There are numerous ways to convert a string to a date, but need to first know what the incoming fields look like. Can you please provide an example?

 

Cheers!

Phil

lamiah13
6 - Meteoroid

Hello thank you for your response @Maskell_Rascal!

 

All fields are coming in as mm-dd-yyyy after being transformed using the cleansing macro. For example, 06-12-1996 and the metadata shows that type is "String" size is "64". Apologies I can't share a screenshot of the data for privacy reasons but I can mock up an example if that would be easier!

Qiu
20 - Arcturus
20 - Arcturus

@lamiah13 
As @Maskell_Rascal mentiond there are several ways.
Alteryx use the Iso format (yyyy-mm-dd) as the format of Date. So we need to convert.
The link below is help for dataTime Functions.

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

1104-lamiah13-1.PNG1104-lamiah13-2.PNG

Labels