Sum date and number (double)

Hi all

i am working on a project however i got stocked trying to sum a column having dates with another column with numbers (double). Basically what i need if to add the days in a column to the dates in another column, for example:
in one column i have 7/27/2021 and in the second column i have the number 25, so for instance in excel if you sum the date and the number, the result would be 8/21/2021, unfortunately in knime i have not been able to do it. Any suggestion would be highly appreciated

Hi.
To add days to an existing column of dates, you can use the Date&Time Shift node. Your table should contain a column in date format and a column of integers representing number of days (I would suggest converting doubles to integers. You can do this with the String Manipulation node).

4 Likes

Hello @Soldado and welcome to the KNIME community

You may use the ‘Extract Date and Time’ node… you can get i.e. 3 columns YYYY, MM, DD
Then you will be able to operate only with DD

You can convert your DD column to ‘Date’ format and then apply the aggregation as well, in this formatted way your life will be much easier.

Regards

1 Like

Hi dnaki

it worked perfectly, i was able to finished the workflow for my project.

Thank you

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.