String MMMyy to date

[1] This is my third case in cleaning data. I got data with format “MMMyy” like below
image

[2]I try to use “string manipulation” like picture below
image

[3] then use node “string to date&time”,
image

however, it gets an error on the 3rd step. If you have other ways to convert string MMMyy column into date, please let me know. thank you

Good morning @ekayani,

what is the exact error message. In the last screenshot of yours there seems to be no error recognized by the node nor do I see one at first glance.

Enjoy your day
Mike

Hi @ekayani

In this case the String to Datetime (Legacy) node helps to convert the string to a date-type.
string_to_date.knwf (10.2 KB)

gr. Hans

2 Likes

Hi @mw
sorry I forgot to give the error message
this the error message:
ERROR String to Date&Time 0:19 Execute failed: Failed to parse date in row 'Row0: Text ‘01AUG16’ could not be parsed at index 2

Thank you @HansS, it converts to date. However, when I want to extract only month and year using “Extract date&time Field” nodes it gets error

image

Hi @ekayani

Add a Legacy Date&Time to Date&Time to your flow.
date-time
gr, Hans

1 Like

Hi @ekanyi -

In this case, the newer String to Date&Time node fails because it isn’t properly handling uppercase month abbreviations (e.g. “APR”). If your month strings are formatted differently (“Apr”) it will work.

Sorry for the trouble. We have a ticket open to fix this issue in the node, but in the mean time @HansS solution using the legacy nodes should work.

3 Likes

Hi @HansS.

Thank you, it works! Finally, I can work with the data :slightly_smiling_face:

2 Likes

Hi @ScottF,

Thank you for your response, I hope it could fix soon.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.