Postgres now() -interval '1 MINUTES' not working in n8n '1 HOURS' works

Describe the issue/error/question

When i make a postgresql query that retrieves the data from postgres for the last 1 minute based on a timestamp field from postgres it fetches the data for the last hour in stead of the last minute.

What is the error message (if any)?

None just returns data from the last hour instead of the last minute

Please share the workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
    0.200.1
  • Database you’re using (default: SQLite):
    Postgresql
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker]:

Hi @Gerben_Immeker, welcome to the community!

I just tried running a query like below:

SELECT
  now() AS "now",
  now() - interval '1 minute' AS "1_min_ago",
  now() - interval '1 hour' AS "1_hr_ago";

This is, however, working as expected for me:

So, I would be very surprised if n8n somehow messes with now() - interval '1 minute' in any way. Can you confirm the exact column type of your created_date column?

Hi MutedJam,

Thanks for your reply,
The created_date field is of the type timestamp

Stange thing is that the query from n8n works in dbeaver but not in n8n.