Workflow to demonstrate how to create a very flexible date format mask to handle a wide variety of date formats. This works provided that the supplied day month and year are are a known order.
What I wanted was a date handling mask that, given a specific order of day month year, didn't actually care too much about how the component parts of the date were actually written. The format mask can only go so far though, and some string manipulation is required to handle the month name being in anything other than Title (Capitalized) case. So if it comes through as lowercase or uppercase it would fail. Likewise, noise punctuation / \ , . -, whatever needs to be turned to white space and duplicated/superfluous white space has to be removed in order for Capitalize to work in all the handled situations.
Being in the UK I concentrated first on regular UK ordering D M Y. But scroll down and I have done the same with (my understanding of) typical US ordering as M D Y
If you have a locale where they are typically in a different order to that given here, change the order in which d M and y entries appear in the date mask.
15/04/2021 @takbb Brian Bates
Workflow
KNIME_Workflow With flexible DATE format mask
Used extensions & nodes
Created with KNIME Analytics Platform version 4.3.2
- Go to item
- Go to item
- Go to item
Legal
By using or downloading the workflow, you agree to our terms and conditions.