Filter Out only whats two months old

I am trying to filter only what is two months old from the day I am running my workflow to the beginning of the month 2 months ago (for example: today is February 9th, 2022 and I’d require data until December 1st, 2021)

I am attaching my workflow that so far has:

02 Months Old.knwf (145.8 KB)

An example of the data set I am using and I was able to pull the year, month, and day separately.

Things I’ve tried:
First I thought that I could take today’s date and count how many days have passed and limit my filter that way, but that would get me either 60 days or two months, but that would only work on the first day of the month and would be missing some data (if I run it on the 15th day, I’d go back 60 days, and not to the beginning of that month two months ago)

Any suggestion would be truly appreciated.
Thank you KNIME community.

Hi @Barajas , I modified your workflow and it looks like this now:

If I sort the results descending, it shows that my latest sys_created_on is December 1st, 2021 for today’s run:

Here’s the workflow: 2 Months Old_Bruno.knwf (159.7 KB)

The comments are added for each node in the workflow. Of course, if you have any additional questions, please do not hesitate to ask.

5 Likes

@bruno29a Thank you for the quick response and the amazing solution to this, this is exactly what I was looking for and now I can use it for several other situations.

1 Like

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