takbb
August 29, 2023, 3:40pm
3
Hi @etoughet , what format are the other rows? The mask for 24/08/2023 which would also work with single digit day and month would be d/M/yyyy. What format mask are you using?
If you have 2 very different data formats, then depending on the specific formats of the data, you could also look at this:
Hi @nisha_rathi . Welcome to the KNIME forum.
You can use two String to Date&Time nodes followed by a Merge Columns node.
The first String to Date&Time node tries the date conversion using format string yyyy-MM-dd and appends a new column with suffix d1. Note the capital letters MM for month, as “mm” would be “minutes”.
Make sure Fail on Error is not ticked:
[image]
The second uses format string ‘dd-MM-yyyy’ and appends column with suffix d2:
[image]
The Column Merger then merges the t…
or possibly even this:
Hi @nisha_rathi , you’re welcome. The above was the general answer to handling multiple formats but on further thought there was a simpler solution and it could be achieved with a single String to Date&Time node using the following format mask instead:
[yyyy-MM-dd][dd-MM-yyyy]
The square brackets make parts of the mask optional and so the node would be able to work with both your formats in one go.