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 / Comparison between two...
Power Automate
Answered

Comparison between two dates

(0) ShareShare
ReportReport
Posted on by 26

Hi everyone,

 

I have a flow that allows me to retrieve data from sharepoint, filter it and the goal is to receive an email at the end of the filters.

 

My date format looks like this after my 1st filter: "Date_de_modification": "2023-09-08T10:16:55Z". And I'd like to compare that date to today's. If it's equal then filter ok. I don't know if I should use comparison or filter. What do you think is the easiest method? I tried filtering with UTCnow but without success. 

 

Yuyu33_0-1710343580960.png

Thank you for your help 🙏.

Categories:
I have the same question (0)
  • MrGott Profile Picture
    101 on at

    when filtering SharePoint, try using the Odata filter expressions, as it will be more efficient

    the filter expression should read something like:

     

    Date_de_modification gt @{formatDateTime(utcNow(),'yyy-MM-dd'))}

  • Yuyu33 Profile Picture
    26 on at

    Hi, 

     

    Thanks for your feedback, i try this option by replace the right expression (because Date_de_modification come from after a select) but it's doesn't work, how can i can do a filtrer after another filter ? Do i have to convert the format ? Pleased find the flow bellow : 

     

    Yuyu33_0-1710426285397.png

     

  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Yuyu33 

     

    In the filter array expression - you have to convert the dates on both sides of comparision to single format - let's say yyyy-MM-dd for this case.

     

    so expression would be 

    Left side > formatDateTime(item()?['Date_de_modification'],'yyyy-MM-dd')

    Right side > formatDateTime(utcNow(),'yyyy-MM-dd')

     

    Another easy approach would be as suggested by @AndiM  using Odata Filter query 

    You can use Odata filter query and then you can use select action with whichever details/columns you need , that would be more efficient.

     

    Filter query Odata should be like this - 

    Nived_Nambiar_0-1710431979783.png

     

    (Modified ge '@{formatDateTime(utcNow(),'yyyy-MM-dd')}') and (Modified le '@{addMinutes(addDays(formatDateTime(utcNow(),'yyyy-MM-dd'),1),-1)}')

     

    What i understood is Modifed column is your Date_de_modification column , so why don't do a filter first with odata using modified date and then do a further select actions ?

     

    Try this and let me know 🙂

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Yuyu33 Profile Picture
    26 on at

    Hello @Nived_Nambiar 

     

    Thanks for your feedback, i try your solution (use Odata filter query) it's work well (i just change the number of minute for my purpose but it's work. Thanks again 😁.

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
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard