HI all,
I have a string cell that look like this:27112022 (is a date DDMMYYYY), but i have to compare to another cell that look like this 271122 (DDMMYY without the 20)
In other words i have to delete the digit 5 and 6 in order to compare with a right node.
I cannot find the solution on this.
I would convert both to a KNIME Dateformat using the String to Date&Time node.
Date format 27112022 => ddMMyyyy
Date format 271122 => ddMMyy
Than you can easily compare both cells.
gr. Hans
I think it is possible in just one node. The String Manipulation node. Or you can take this 2 nodes solution. Split the cell by position and concate the strings together with the Column Aggregator node (no delimiter).
gr. Hans
Just to explain the expression: join(substr($column1$, 0, 4), substr($column1$, 6))
Breaking down: substr($column1$, 0, 4) means start at the beginning (position 0), and give me the next 4 characters of $column1$, which essentially means give me the first 4 characters from $column1$. For that row, that would be ā2711ā substr($column1$, 6) means give me everything after the 6th position of $column1$, which essentially means give me everything from the 7th position to the end of $column1$. For that row, that would be ā22ā
And joined together, you get the first 4 characters, and the 7th and 8th characters, which basically means removing the 5th and 6th characters, which for that row gave ā271122ā