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 / odata Date Filter Not ...
Power Automate
Unanswered

odata Date Filter Not Working

(0) ShareShare
ReportReport
Posted on by 358

I use odata date filters on get item (SP) actions frequently.  I just created a new list where this does not work however.  I have tried inputting the get item dynamic variable, and also composing a date variable using the @formatdatetime function but neither seem to work.

 

Any idea why this is happening?

 

This is the list I am Querrying

 

Tub Results.PNG

Here is the querry and the results using a compose variable to format the date time from the SP get item trigger:

 

Output Filter.PNGOutput Results.PNG

 

Here are the same results using the dnyamic variable from the trigger

 

Date Filter 1.PNGOutput Results.PNG

 

Any thoughts on what I am doing wrong here?

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @WiggityZwiggity,

     

    I think the issue here should be the string format.

    The formatted date string under Microsoft Flow can't be matched exactly with the date string under the SharePoint Server side, this should be considered as a current limitation of Microsoft Flow (or saying the Flow service OData query).

    Using 'le' or 'gr' OData operator with the date string should work under the SharePoint Filter query.

    Besides, dynamic content should not work under the filter query, we should add the actual string with single quotes to make it work.

     

    As a workaround, please consider add a filter Array action, then take use of formatdatetime function to format both the Date from SharePoint list and the date you would like to compare in the same date format.

    @equals(
     FormatDateTime(item()?['Date'], 'yyyymmddHHss'), 
     FormatDateTime(Outputs('Compose'),'yyyymmddHHss')
     )

    9.PNG

     

    Regards,

    Michael

  • efialttes Profile Picture
    14,756 on at

    Hi

    I managed to have dynamic content under the ODATA filter query; not sure if this is design intent.

    The workaround that is working for me is to package everything into an expression, for example:

     

    concat('MySPListColumn eq ''',triggerBody()?['App']?['Value'],'''')

     

    Hope this helps

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard