Skip to main content

Notifications

Community site session details

Community site session details

Session Id : AG6b2NAhcG6axbsvJq38rO
Power Automate - General Discussion
Answered

OData Date Range

Like (0) ShareShare
ReportReport
Posted on 16 Mar 2022 17:22:53 by 31

I am trying to make an Odata filter that will only take data entered within the last week from my source so instead of a specific date range it is a rolling range from 'Today'.  Is that possible?

  • Cjohnson20 Profile Picture
    31 on 17 Mar 2022 at 12:41:38
    Re: OData Date Range

    Hey Ellis.  This worked in my flow.  Thanks for the help.

  • Verified answer
    Ellis Karim Profile Picture
    10,994 Super User 2025 Season 1 on 16 Mar 2022 at 22:11:14
    Re: OData Date Range

    You can use the utcNow() to get the current date and addDays() function to add or substract days from the current time.

    addDays(utcNow('yyyy-MM-dd'), -7)

    For example, in the following filter query I am searching for items that were created between today (2022-03-16) and 2022-03-09:

    Snag_7f59d55.png

    Hope this helps.

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

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

Announcing the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - General Discussion

#1
stampcoin Profile Picture

stampcoin 23

#2
Pstork1 Profile Picture

Pstork1 20 Most Valuable Professional

#3
Gprior Profile Picture

Gprior 19

Overall leaderboard
Loading started
Loading complete