Forum Discussion
Power Automate: SP Get items - filter by date return no values
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)
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