web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get rows(V2) Filter Qu...
Power Automate
Answered

Get rows(V2) Filter Query with date

(0) ShareShare
ReportReport
Posted on by 152

I want to query for a table in a SQL Database for a Date field greater than a certain date. 

 

In "Filter Query" field, I put in "ExpDate ge '2020-07-18'

 

When I ran this Flow, I got an error saying "We cannot apply operator < to types Text and DateTime".

 

ExpDate is a date field in the SQL table. 

 

So, what should the syntax be?  

 

I set this Flow up a few months ago and it was working back then.  Now, I revisited it and it is not working.  

 

Dan Chan 

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    js-dattics Profile Picture
    98 on at

    Hi.

     

    You can't delegate filtering by dates on SQL within Power Platform.

    js-dattics_0-1595180574226.png

     

    Please check all the delegations: https://docs.microsoft.com/en-us/connectors/sql/#power-apps-delegable-functions-and-operations-for-sql-server

     

    As stated on Microsoft site:

    Direct date filters do not work for SQL Server. However, you can create a calculated column that will work. For instance, ALTER TABLE myTable ADD DateAsInt AS (YEAR([date]) * 10000 + MONTH([date]) * 100 + DAY([date])) and then filter on the calculated number column.

     

  • dc7669 Profile Picture
    152 on at

    Hi @js-dattics , 

     

    This WORKED!  THANKS!  

     

    I think the syntax I used ( In "Filter Query" field, I put in "ExpDate ge '2020-07-18')   did work as a few months ago.   Something must have changed.  Regardless, what matters now is how to fix it and your suggestion DID WORK!! 

     

    Thanks!  

     

    Dan Chan

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 58

#2
David_MA Profile Picture

David_MA 53 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 36 Most Valuable Professional

Last 30 days Overall leaderboard