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 / SharePoint List - Get ...
Power Automate
Unanswered

SharePoint List - Get items filter query on dates - format as date only (not time)

(0) ShareShare
ReportReport
Posted on by 3

Apologies I am quite new to Power Automate. I have a SharePoint list in which I need to compare two date columns.

 

I need my flow to update the date in the 'Next review date' column, to be 6 months later than the 'Date of last review' column (which is updated manually in SP).

 

The current flow works but is very slow and updates every single item in my list, when I just want it to update items where the 'Next review date' is not equal to the 'Date of last review plus 6 months'.

 

Can anyone advise how I could use the filter query in 'get items' to stop every item being updated with each flow run? I think my issue is removing the time stamp and formatting the dates as 'date only'.

 

(The reason I am not using a SharePoint calculated column is because calculated columns are not compatible with a separate flow I have built for sending email reminders).

 

Thank you!

 

 

Screenshot03.png
Screenshot02.png
Screenshot01.png
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @Paula_M It's a lot more efficient to use a Filter Query in the Get Items action to filter out your items first before you loop through them. By using the Apply to Each and Condition action, you are looping through every item in your SP List and running a check which is inefficient. I've linked a tutorial at the bottom of this post that will help you to get the dates you need in your filter query.

     

    Whenever you filter out items, it can be helpful to use a Compose action afterwards to store the count of items returned. I would recommend testing this part of your flow first before you move onto building the rest of your flow. 

    Return Item Count

    Whenever I use a Filter Query in a Get Items action, I always like to return the count of items returned in a Compose action. This is helpful when building a flow and can also be used to troubleshoot your flow.

    Insert a Compose action. Add an Expression. Use the length() function.

     

    creativeopinion_0-1715785912270.png

     

     

    Select the Dynamic content tab and insert the value dynamic content from the Get Items action into the length() function.

    creativeopinion_1-1715785912280.png

     

    Run a test. Review the outputs of the Compose action to ensure the number of items being filtered out is what you are expecting. If it's not, you'll need to check your filter query.

     

    creativeopinion_2-1715785912364.png

     

     

    You might find this YT Tutorial helpful:

    How to Work with 📆 Dates in Power Automate | Example Scenarios and Tips & Tricks

    Are you easily stumped when working with Dates in Power Automate? In this Power Automate tutorial, I’ll show you how to compose an expression that will return a future date, a past date, how to count the number of days between two dates, how to check for a birthdate and anniversary date as well as tips and tricks when working with dates in Power Automate.

     

    I’ll cover some common use cases and concepts that can help you to build better Power Automate flows. Feel free to skip ahead using the timestamps listed below. I’ve also linked a few other tutorials that you might be interested in as well.

     

    IN THIS VIDEO:

    ✅ 4 Date Functions You Need to Know

    ✅ How to use the Convert Time Zone Action

    ✅ How to Get a Future Date

    ✅ How to Get a Past Date

    ✅ How to Return SharePoint Items Due in a Number of Days

    ✅ How to Return SharePoint Items Due within a Date Range

    ✅ How to write a Filter Query for SharePoint Items Due in 30, 60 and 90 Days

    ✅ How to Calculate the Number of Days between Two Dates

    ✅ How to Check for a Birthdate and Anniversary Date

    ✅ How to work with Dates and Times in Excel

    ✅ How to use a Manual Trigger with Date Input

    ✅ How to Output Dynamic Text with an Expression

    ✅ How to Check if a Date Falls on a Weekend

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • Paula_M Profile Picture
    3 on at

    Thanks every so much this is very helpful.

     

    I just can't seem to crack the date filter query. I essentially need it to be:

     

    'Dateoflastreview' plus 6 months ne 'Nextreviewdate'

     

    So only those list items will be checked and updated. Is this possible?

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 921

#2
Valantis Profile Picture

Valantis 801

#3
Haque Profile Picture

Haque 588

Last 30 days Overall leaderboard