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.
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
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!
@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