With “add_date_duration($[“Date”], parse_date_duration(“P-1D”))” it’s possible to substract a day from you date column.
So the only thing to do is to use the convert the integer value of the offset into a string with the prefix “P” and suffix “D”. This is done in the “string manipulation (variable)” node:
string(“P”)+string($${IDelta}$$)+string(“D”)
and pass it into the “Expression” node:
add_date_duration($[“Date”], parse_date_duration($$[“delta_str”]))
Oh! Since you can enter negative values directly into the Shift value field, this looks like a bug to me. I opened a ticket (internal reference AP-25311).
For now, a 5.8 workaround might be to append a column with the value from the variable using Constant Value Column – KNIME Community Hub and than using that column in the Date Shifter.
For 5.5, I would recommend an expression-based solution as suggested by @ActionAndi using
thank you very much for your fast support and workarounds. Meanwhile I used successfully the number column option with an additional column which is also feasible in my case. And of course it’s good to have the variable problem fixed in the next update.