Time and date filter node

Hello,

I am struggling to understand the issue of parsing timestamp to filter node.
In filter node I use condition formattedSchedulerDate is after transaction_date which filters out all data. In this case left value is undefined.
When I hardcode value from formattedSchedulerDate to filter condition it filters correctly, passing data that is older than formattedSchedulerDate.

I used merge for getting parallel trigger for workflow, but without merge in filter happens the same.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.109.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

Hey @Zyga hope all is good.

Your merge node doesn’t have any inputs, this is probably not intentional, so you want to fix that first.

Then, if you could pin the output from botj Extract from file nodes, that would help.

Actually, merge I just left at the moment hanging for test purpose while wrote this post.
As I said, both ways it filters out all data.

{“nodes”: [{“parameters”: {“options”: {}},“type”: “n8n-nodes-base.extractFromFile”,“typeVersion”: 1,“position”: [48,-176],“id”: “39b650d1-e2a8-4b5f-a9bb-585b5cd82abc”,“name”: “Extract from File”},{“parameters”: {“conditions”: {“options”: {“caseSensitive”: true,“leftValue”: “”,“typeValidation”: “strict”,“version”: 2},“conditions”: [{“id”: “9d848160-5fd0-4eb8-a83b-af55f02d2438”,“leftValue”: “={{ $json.formattedSchedulerDate }}”,“rightValue”: “={{ $json.transaction_date }}”,“operator”: {“type”: “dateTime”,“operation”: “after”}}],“combinator”: “and”},“options”: {}},“type”: “n8n-nodes-base.filter”,“typeVersion”: 2.2,“position”: [720,-80],“id”: “1c097f88-85ea-4070-bbda-7f02713b1840”,“name”: “Filter”,“notesInFlow”: true,“notes”: “Filter for the same day as today”},{“parameters”: {“operation”: “text”,“destinationKey”: “scheduler_timestamp”,“options”: {}},“type”: “n8n-nodes-base.extractFromFile”,“typeVersion”: 1,“position”: [48,16],“id”: “64ace024-cf7b-4dce-a723-3896091a8470”,“name”: “Extract from File2”},{“parameters”: {},“type”: “n8n-nodes-base.merge”,“typeVersion”: 3.2,“position”: [560,-80],“id”: “2bc460f5-7681-4ade-95c8-884c8e41cbc0”,“name”: “Merge”},{“parameters”: {“operation”: “formatDate”,“date”: “={{ $json.scheduler_timestamp }}”,“format”: “custom”,“customFormat”: “yyyy-MM-dd HH:mm:ss”,“outputFieldName”: “formattedSchedulerDate”,“options”: {}},“type”: “n8n-nodes-base.dateTime”,“typeVersion”: 2,“position”: [272,16],“id”: “00be0d1f-643b-4144-98bb-cc0ea9b6e030”,“name”: “Date & Time1”}],“connections”: {“Extract from File”: {“main”: [[{“node”: “Merge”,“type”: “main”,“index”: 0}]]},“Filter”: {“main”: []},“Extract from File2”: {“main”: [[{“node”: “Date & Time1”,“type”: “main”,“index”: 0}]]},“Merge”: {“main”: [[{“node”: “Filter”,“type”: “main”,“index”: 0}]]},“Date & Time1”: {“main”: [[{“node”: “Merge”,“type”: “main”,“index”: 1}]]}},“pinData”: {},“meta”: {“templateCredsSetupCompleted”: true,“instanceId”: “f387f98b15c0350bb159fa4de9ea3273f7d15774231ec7dcd91f7bb5d7f3cb9c”}}

If you pin the data, I can take a look at the result.

You mean CSV file?

CSVs themselves or just pinned data.

Change your merge node to be configured like this and see if that helps:

1 Like

Hey @Zyga

how did it go? Did you get the expected output?

That is worked perfect, thanks!

1 Like

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