Description:
The example date/time formats don’t take into account the locale, which causes confusion specifically when handling AM/PM which is uppercase in US but lower cases in UK locales.
Steps to Reproduce
- In Modern UI, add a Table Creator to a workflow and enter a datetime such as
17/6/2025 8:00 PM
- Connect a String to Date&Time node
- Set the locale to English(United Kingdom)
- Select the
Date & time
input format - click the format filter options and choose European
- scroll down to the format
d/M/yyyy hh:mm a
which will show the current date/time with PM on the end. i.e. it exactly matches the format of the test data. - Choose that format and attempt to apply and execute
Actual results:
The node fails because 17/6/2025 8:00 PM does not match the format 'd/M/yyyy h:m a` even though the node format-mask dropdown suggests it does.
(hint: if you set the locale to English (United States) the mask will work because US locale uses uppercase AM/PM)
Expected results:
The node format dropdown example for English (United Kingdom) should have lower case am or pm, or alternatively (suggestion) there should be an option to make the matching of dates case-insensitive since I think this is an option on the underlying java date parsing class, and this AM/PM vs am/pm already causes problems periodically for users of KNIME.
Further investigation shows that for non-english locales, the example month names themselves do not reflect the chosen locale, and always display in English,. It looks like all the examples assume US English which may be confusing for everybody else.
The equivalent issue also appears in the Date&Time to String node.
Attachments:
OS:
Windows 10