Skip to main content
Community site session details
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,949 Super User 2025 Season 2 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! 🙌

     

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete