dd-MMM-yyyy not working in "String to Date&Time"

The following config for “String to Date&Time” is not working:

Error:
ERROR String to Date&Time 3:34 Execute failed: Failed to parse date in row ‘Row0’: Text ‘Mon 02-Jan-2017’ could not be parsed at index 0

A string, “Mon 02-Jan-2017”, should be parsed by “EEE dd-MMM-yyyy” but isn’t. Could there be a UTF-8 thing or something like that?

Also tried string manipulation to remove the "Mon " part. So columns were just “02-Jan-2017” but could not be parsed by “dd-MMM-yyyy”. So it’s not the day name part that’s flopping. And it’s not extra spaces as the ERROR message shows the text is ‘Mon 02-Jan-2017’

Using KNIME 4.6.1

Hi @scorpdaddy and welcome to the Knime Community.

This happened to me a while ago, and it drove me crazy.

It turns out that this format is supported only under the Locale en-US. You would think that it would also work with en-CA, but for some reason, it does not. I’m in Canada, so my Locale defaults to en-CA too.

Just change your Locale to en-US and it will work.

2 Likes

Awesome! That worked! Thanks!
Sounds like a bug though. Has it been reported? Or where does one report it?

I’m not sure if it’s a bug, but I also don’t understand why it would not work under en-CA at least.