How do I convert month name to number, from APR to 04?
With the rule engine node e.g.
I once had the same problem and wanted to have an automated approach. However, a Rule Engine with 12 Rules might be faster made
Step 1: Convert the APR into “01.Apr.2018” (With the String Manipulation node as follows:
Step 2: Convert the String into a Date
Step 3: Use the Extract Date & Time Field node to get the month number.
My Mini Workflow looked like this:
Thank you Iris for your reply, this is very helpful.
Thanks, it is very helpful and works for me.
I tried for several minutes to get this to work, and finally discovered that it only works if I pick a locale other than en-AU in the String to Date&Time node. Of course I haven’t tried all of the other locale options, but the several that I did try all worked, while it fails if I pick en-AU.
Is this a bug?
Thanks @ipazin. So yes, technically not a KNIME bug, but something that from the user’s perspective is wrong and inexplicable. Hopefully, the more expected behaviour will return in future with further Java updates.