This could be solved in a simpler way using only the -String Manipulation- and the -Lag Column- nodes. However, I’m suggesting this solution here to illustrate how to convert strings into dates and vice-versa too.
@aworker awesome solution! Please remind me the string to datetime node requires a specific format right? (E.g. leading zeros, or 4 digits,…)
Sometimes I am a little confused when KNIME is not picking up the date and throws an error. Maybe I should use the node more often ^^
thanks
Indeed but the node has a very nice feature in the configuration menu which most of the time manages to guess the right format. Having said this, it not always succeeds and a bit of help beforehand with a -String Manipulator- node might facilitate a lot its success.
I am not a specialist of “Date & Time” conversion (only a DIYer haha ha). However @takbb did a tremendous and remarkable work on implementing a component which understands most of Data&Time formats:
I believe the node is not happy with a 2 digits year which I can understand since it is prone to ambiguity and miss-confusion with months and days. I always rather prefer to convert the year to a 4 digits format.