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 / Power Automate filter ...
Power Automate
Unanswered

Power Automate filter query ODATA compare date

(0) ShareShare
ReportReport
Posted on by 45

 Hi 

 

i just want to compare 2 dates in a filter query Odata.

I want to compare the "modified" field with an another date time field "mydate" , but i cannot succed to find the right syntax !!

 

In the filter request i would like to write something like 

Modified ge 'mydate' 

 

but it doesn't work !

 

I've tried to convert by formatdatetime.. but no !!

 

Please help me in the syntax ! 

 

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    @jpr23 when comparing dates it is always wise to use yyyy-MM-dd format. So my suggestion would be to add 2 compose actions, one for the modified date and one for mydate and format both with using a formatDateTime expression.

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • jpr23 Profile Picture
    45 on at

    Of course but , it is in the Get Items action . So i have to indicate a filter query to filter the get Items.

    The syntax must be similar to : 

    Modified gt .....myDateField

     

     

    where

    Modified is the standard field of the list 

    MyDate is my own date/time field to compare

     

    I don't know if i have to convert the Modified date format also ?

    I am stopped in the syntax !!!

     

  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    @jpr23 you don't HAVE to use a filter query, you just get the warning because using one can make the get items more efficient. The main thing to remember is that the date format of each side MUST be exactly the same and formatting it in yyyy-MM-dd is the best way to ensure this.

     

    Rob
    Los Gallardos

  • jpr23 Profile Picture
    45 on at

    Hi , 

     

    this is the Get Items ( in french) 

    I just want to compare the "Modified" date field with my own date field...

    But i don't know how !!!

    Modified gt Mydate

    or

    Modified gt formatdatetime(mydate,'yyyy-MM-dd HH:mm' ) 

    ....

    or other ? 

     

    jpr23_0-1686580852600.png

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard