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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter SQL Date field ...
Power Automate
Answered

Filter SQL Date field issue

(0) ShareShare
ReportReport
Posted on by 98

I have a flow with a SQL Get Rows action.  The action has a simple filter:

AsofDate eq '2015-06-16'

 

When I trace the query using SQL Pofiler, I see that flow is sending the following SQL for the where clause:

 

execute sp_executesql N'select top 1
(omitted columns and tablename)
where 0 = 1'

 

 

Any idea why Flow is sending 0 = 1 for the where clause?  This does not make any sense.  The Get Rows action is returning an empty result set.  The table has many records with that value in that column.

 

Flow Result:
flow_asofdate_filter.PNG

 

Action Configuration: 
flow_date_formula.PNG

 

I also tried the date with single quotes around it.  I also tried typing the date without the formula, like '2015-06-16'.  

The column is a Date column.

Categories:
I have the same question (0)
  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi jonathanO,

     

    Please take this doc for a reference:
    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-rest-requests

     

    For your scenario, you may try to use the following function:

    Year(birthday) eq 2017 and month(birthday) eq 10 and day(birthday) eq 06
    

     

    I have tested it on my side, and it is working fine.

    3.PNG

     

    Please try it on your side. Hope this could be a reference for you.

     

    Best regards,
    Mabel Mao

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard