Convert String to Date Column Error

Hi guys, I tried to convert my column from string to date using String to Date&Time node but is says ERROR String to Date&Time 0:62 Execute failed: Failed to parse date in row 'Row0: Text ‘20211117’ could not be parsed at index 2

Please note that Column Certificate Date contains some rows of missing value.

Certificate Date
20211117
20211117
20211123
20211123
20211220
20211217
20211217
20211217
20220107
20220107
20220107
20220107
20220107
20220107

Sample Output Data
image

Thanks in advance!

Does using the Date format yyyyMMdd in the String to Date&time node work?

there’re
4 digits with the year (yyyy)
2 digits with the month number (MM)
2 digits with the day of the month (dd)

1 Like

Yes, but still error ERROR String to Date&Time 0:62 Execute failed: Failed to parse date in row 'Row0: Text ‘20211117’ could not be parsed at index 0

Other than do you think that String to Date&Time could work even though the column had some blank rows?

You’re not using the right format, I gave you yyyyMMdd, not yyyy-MM-dd.
Parsing should fail at index 4, not sure why it says index 0 (behaves the same way in my machine).
Anyway, that should fix your problem :slight_smile:

I also checked what it does with missing values, it will simply result in a missing date.

5 Likes

I thought the date format drop down are fix output. yes it worked I removed the “-” inside of it. thank you!

1 Like

Hi @seanmanzanilla , yes this drop down is a bit confusing. It does give the impression that you are limited to what’s there, but it’s really a free text where you can enter what you want. I think the drop down simply shows you some of the most common formats, and some of what you have entered before.

1 Like

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