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 / Get Items - Within two...
Power Automate
Answered

Get Items - Within two dates listed

(0) ShareShare
ReportReport
Posted on by 19

Hello! I'm trying to filter query for SharePoint items between two dates listed in this format: yyyy-mm-dd in a SharePoint list  (post date, and expiration date of post).

 

I'm looking to filter to all the items that would fall between those two dates. 

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    Assuming you added two "Initialize variable" action blocks, both type string, names PostDate and ExpirationDateOfPost, values the dates you wanna take as the limits, both of them in the format yyyy-MM-dd.

     

    Flow_ODATASharepoint.png

     

    Now on your 'Get items' action block you can define an ODATA filter on 'Filter query' input (you need to click 'Show advanced options' to see this input) by typing the following:

     

     

     

     

    InternalColumnName gt '@{variables('PostDate')}' and InternalColumnName lt '@{variables('ExpirationDateOfPost')}'

     

     

     

     

    Just replace 'InternalColumnName' with the one corresponding to your target column in your Sharepoint List

     

    GReat article on ODATA filters for Sharepoint here

    https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/

     

    Not in my laptop, unable to help

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi again!

    Back to my laptop, I just did a simple test with standard column Created and works like a charm

    Flow_ODATASharepoint_2.png

    So in the example my ODATA Filter provides items created either on 2020-09-14, 2020-09-15, 2020-09-16 or 2020-09-17. Please note Sharepoint standard Created column stores date+time in ISO 8601 format:

    yyyy-MM-ddTHH:mm:ssZ

     

     

    Hope this helps

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard