Announcements
Dear All,
I have a power automate with get items which I need to filter a SharePoint list. The filter needs to filter records if todays date is in between two columns Start Date and End Date.
How is best to filter query this?
Kind Regards
Daniel
Hello @DLCaterhamSch
Here is my test list
And here is the flow
using this filter, you will be able to get only items where Start date < utcnow() and EndDate > utcnow()
(StartDate lt '@{utcNow()}') and (EndDate ge '@{utcNow()}')
Hope this helps
----------------------------------------------------------If I have answered your question, please mark your post as Solved. 🆗✔️If you like my response, please give it a Thumbs Up. 👍You can accept more than one post as a solution.
In the "Get items" set a (ODATA) filter query like this:
StartDate lt '@{utcNow()}' and EndDate gt '@{utcNow()}'
🤣
🤣🤣🤣
This is definetely the closest got to this. It doesnt work if the start date is today and end date is today though?
Since utcNow() has a time, the first part
StartDate lt '@{utcNow()}'
includes the start date (if it's without time or 0:00).
To have the second part including the end date you need to add a day to utcNow() and use startOfDay() if also the hours matter.
Sorry I dont understand?
OK, addDays was wrong
Use
https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#startOfDay
and
https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#addDays
to check if EndDate is greater than today 0:00 h
If StartDate includes a time other than 0:00 h you have to add a day there, to check if it's less than tomorrow.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
trice602 237 Super User 2026 Season 1
David_MA 176 Super User 2026 Season 1
Power Platform 1919 96 Super User 2026 Season 1