Hi,
I’m connecting to our Magento platform\website puling orders. Problem I am having I pulling all the orders which will be thousands. I am trying to put use a Date Range filter but I do not how to do this.
Ideally just want a filter to filter on todays date and how to do a filter for yesterdays date. Whats the format I should use in the Value field?
Any help would muchly be appreciated.
For Magento 2 date filtering in n8n:
- Use ISO format for dates: `YYYY-MM-DD` (e.g., `2023-11-15`)
- For today’s orders: Set filter to `created_at` “Greater or Equal” with value `{{ $now.toISOString().split(‘T’)[0] }}`
- For yesterday’s orders: Use `{{ $now.minus({days:1}).toISOString().split(‘T’)[0] }}`
Pro tip: Switch to JSON mode for more complex date ranges. The Magento API expects the exact format shown above.
Cheers.. I did find a node to get the current date and works perfectly