An Azure service that automates the access and use of data across clouds without writing code.
Hello Christopher Fryett,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Yes, the SQL Server connector in Power Automate does not support full OData datetime filtering due to some reasons as you noticed and for the fact that SQL Server connector’s OData filter has limited support for datetime formats, especially with 2025-09-05T00:00:00Z. These limits differ across environments such as Azure SQL versus on-prem gateways, which makes datetime filters unreliable in Power Automate.
If you are on Azure SQL or cloud connections, the best fix is using Execute a SQL query (V2). Write a parameterized query with DATETIMEOFFSET or DATETIME2 parameters, for an example:
SELECT * FROM dbo.MyTable
WHERE column1 >= @startDate
AND column1 < @endDate;
This approach keeps filtering sargable, uses indexes, and handles time zones reliably. - https://learn.microsoft.com/en-us/connectors/sql/
When on-prem gateways prevent Execute SQL queries, the next best option is creating a persisted computed column for the date portion of your datetime and indexing it. Example:
ALTER TABLE dbo.MyTable
ADD DateOnly AS CAST(column1 AS date) PERSISTED;
CREATE NONCLUSTERED INDEX IX_MyTable_DateOnly ON dbo.MyTable(DateOnly);
You can then filter in Power Automate with:
DateOnly ge '2025-09-05' and DateOnly lt '2025-09-06'
Other alternatives exist but with trade-offs. A view can expose a date-only column for filtering but is static and still requires DB changes. Power Query transformations can help with more advanced filtering through gateways but add complexity. For small datasets, Get rows (V2) followed by a Filter array works, though it is inefficient. - https://community.powerplatform.com/forums/thread/details/?threadid=41f7ea00-ed00-f011-bae3-7c1e5248e2ba and https://cloudminded.blog/2021/02/02/getting-data-from-a-function-in-an-on-prem-sql-server-via-gateway-in-power-automate/
When OData filtering is unavoidable, you can fall back on functions like year(), month(), and day(). For example: year(column1) eq 2025 and month(column1) eq 9 and day(column1) eq 5
However, these make queries non-sargable and prevent SQL Server from using indexes, so they scale poorly. - https://www.brentozar.com/archive/2018/06/can-non-sargable-predicates-ever-seek/
So, use Execute a SQL query (V2) with parameters if supported, otherwise create a persisted computed column with index for date-only filtering. Avoid function-wrapping filters for large datasets. For small or temporary needs, post-retrieval filtering in Power Automate is acceptable.
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.