Forum Discussion
Power Automate: SP Get items - filter by date return no values
Hello all,
I'm trying to get entries in a SP list based on the date in one of the columns (FinalizedDate)
For examples, the first three entries:
I've set-up my query like this:
However, the above "Get items" return 0 results.
If instead I put
FinalizedDate eq '2025-01-28'then it's returning a lot of matches, so the name of the column is right in the query filter.
I thought it might be some kind of time-zone difference between Power Automate and the SP list so I tried "2025-01-29" and "2025-01-30" but both are also returning no result.
What am I missing here? Why doesn't it return any value?
2 Replies
- Rob_ElliottSilver Contributor
MarShaw your filter query is not formed correctly; you don't type in the expression but use the expression tab in the dynamic content box (in the modern designer it's the fx button). And the expression should be using utcNow(), not Today. Finally the expression should be inside single quotes. The following example brought back just Nevis as expected when using the expression formatDateTime(AddDays(utcNow(),-1), 'yyyy-MM-dd')
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)- MarShawCopper Contributor
Hey Rob,
Thank you for your answer, I realized I took a screenshot of the comment section and not of the query filter itself >_<
Here is what the query filter looked like:
With "Output" being a date in format: 2025-06-29
However I think I found what the issue was:
SP list are always storing date data in full ISO8061, meaning with the time included.
So it was probably filtering for exactly the same moment in time that "2025-06-29" which is probably "2025-06-29T00:00:00.0000000Z".The solution I found was to replace an exact comparison (eq)
FinalizedDate eq '2025-06-29'by the two limits around the day I'm looking for: its start (first second of 29th) and its end (first second of 30th)
(FinalizedDate gt '2025-06-29T00:00:00.0000000Z') and (FinalizedDate lt '2025-06-30T00:00:00.0000000Z')This resulted in the query properly returning the expected entries.
While writing this, I realized I should probably use "ge" instead of "gt" on the first comparison to avoid removing the value "2025-06-29T00:00:00.0000000Z" of the query.
Sorry for my question being unclear and thank you for having taken the time to answer to it! :)
Kind regards