Issue with Date Parsing

SubhoM93
Level 1
Issue with Date Parsing

I have a string column in my data that stores date as in following example - 5/1/23 (1st May, 2023). I wanted to parse this to ISO date format, I used the prepare recipe - date parser, formula (asDate), datepart concatenations. I also tried using SQL recipe (To_Date, etc) however every time on running and building the dataset (snowflake) I get the date output as "0023-05-01 T4X:XX:XX" while in recipe preview it shows correct format.

I have also tried parsing into date and then using formating. After running recipe output still has the issue.

Please help.

0 Kudos
2 Replies
Turribeach

On the Prepare recipe, on the column that has the date as a string select the black arrow from the column heading name and select "Parse date...". Pick the correct format from the suggested formats and click on USE DATE FORMAT button. Now you will have a date data type column. Use that column in a function to back to string to your desired format in a new column. You can now delete the other columns if you don't need them in the output by clicking again in the column heading and selecting delete. 

0 Kudos
SubhoM93
Level 1
Author

Hi @Turribeach Thank you for your suggestion. I did the same but now the new parsed column is coming empty, I used the correct date format for parsing. Can you guide me on what I might be missing here? Thanks

0 Kudos