Skip to main content
Community site session details

Community site session details

Session Id : Tr3Mox/GZJ1A9XZmci3FtX
Power Automate - Building Flows
Answered

Date Difference Odata Filter Query Sharepoint List

Like (0) ShareShare
ReportReport
Posted on 14 May 2024 17:44:48 by 6

Hi, I'm currently trying to get all rows that are less than or equal to one week ago from today in terms of date.

Here's the query which I'm using. Last Emailed Date le @{formatDateTime(addDays(utcNow(), -7), 'MM/dd/yyyy')}

PKG6_2-1715708598709.png

 

Here's the column in sharepoint.

 

PKG6_1-1715708151488.png

Here's the error I'm getting.

PKG6_0-1715708118655.png

  • Verified answer
    Nived_Nambiar Profile Picture
    17,911 Super User 2025 Season 1 on 14 May 2024 at 18:01:08
    Re: Date Difference Odata Filter Query Sharepoint List

    Hi @PKG6 

     

    Just check what is internal name of the SharePoint column Last Emailed Date ? as the internal name is used in the Odata filter query.

     

    From my experience, internal name of Last Emailed Date would be LastEmailedDate

     

    So try this odata query 

    LastEmailedDate le '@{formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')}'

     

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

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

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1