Cannot get ANY time filters to work

Describe the problem/error/question

I want to filter out events from an RSS feed so that i only have the most recent 10 days of events.
I thought I may be able to do this using the Filter node, so i set that up:

Manual Trigger → RSS Read → Filter

However, no matter what I try to change in the filtering, I cannot get it to output anything.

I have tried setting it to filter:

  • Before/After/Before or equal/After or equal to $now.toISO()
  • Before/After/Before or equal/After or equal $now.minus(10, days).toISO()
  • Based off a “Before” and selecting tomorrow in the interactive date picker (which simply errors out complaining about js not being able to convert my picked time to a datetime object)
  • Is equal to $now.toISO()
  • Is not equal to $now.toISO()

It udderly befuddles me, how can a single value be simultaniously not before, after, equal, or not equal to now… surely that describes all of time multiple times over?

What is the error message (if any)?

None

Please share your workflow

Can you try this?

Main reason your filter fail is because of data type mismatch.

(The RSS Read node output is in string format but filter is dealing with date. You need to compare apple with apple)

Welcome @Lilly to our community! I’m Jay and I am a n8n verified creator.

The RSS Read node outputs pubDate as a string (e.g. "Mon, 12 May 2025 10:00:00 GMT"), not a Date object - so comparing it directly to $now.toISO() won’t work. You need to parse it first.

In the Filter node, use an expression on the left side:

{{new Date($json.pubDate).getTime()}}

Then set the operator to “Greater than” and on the right side:

{{$now.minus({days: 10}).toMillis()}}

Both sides are now in milliseconds (numbers), so the comparison works correctly.

The issue is usually that the RSS date field is a string, while the Filter node expects a proper datetime value.

In n8n RSS feeds, the publish date is often something like:


pubDate: "Tue, 16 Sep 2025 12:30:00 GMT"

The Filter node does not always auto-convert that into a DateTime object.

Instead of comparing directly to $now, convert the RSS date first.

Try this setup:


Correct Filter Setup

Workflow


Manual Trigger → RSS Read → Filter

In the Filter node

Left Value

Use the RSS publish date field, for example:


{{ DateTime.fromRFC2822($json.pubDate) }}

or if your feed uses ISO dates:


{{ DateTime.fromISO($json.isoDate) }}

Operation

Choose:


is after

Right Value


{{ $now.minus({ days: 10 }) }}

Why your previous attempts failed

You were comparing:


$json.pubDate

(a string)

against


$now

(a Luxon DateTime object)

So the Filter node could not properly evaluate the condition.


Another Important Detail

This expression is incorrect:


$now.minus(10, days)

Correct Luxon syntax is:


$now.minus({ days: 10 })

Recommended Alternative (More Reliable)

Sometimes the Filter node behaves inconsistently with dates.

A more reliable approach is:


Manual Trigger → RSS Read → Code node

Then use this in the Code node:


const cutoff = Date.now() - (10 * 24 * 60 * 60 * 1000);

return items.filter(item => {
  const pubDate = new Date(item.json.pubDate).getTime();
  return pubDate >= cutoff;
});

This keeps only items from the last 10 days.

This basically works, cheers. One hiccup is that if you do not set a timezone upon creating your workflow, it always evaluates $now to NaN, which is extremely unintuitive imo…
e.g. {{$now.minus({days: 10}).toMillis()}} returns NaN without a timezone set (silently, no errors!), but a valid number otherwise, which is probably what tripped me up!

Good catch on the timezone thing - that’s a real gotcha with $now in n8n. Make sure the workflow timezone is set under Settings > Workflow Settings > Timezone, and $now will behave correctly from there. Glad it’s working!