web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Items from last 3 months
Power Automate
Unanswered

Items from last 3 months

(0) ShareShare
ReportReport
Posted on by 93

Hi, 

 

I'm trying to get SharePoint list items from the last 3 months from a column called DueDate. I'm trying with this formula in the filter query, but it's not working.. (items are not from last 3 months).

 

DueDate ge '@{formatDateTime(startOfMonth(getPastTime(3,'Month')),'MM-dd-yyyy')}' and DueDate lt '@{formatDateTime(startOfMonth(utcNow()),'MM-dd-yyyy')}'

 

Any ideas anyone?

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,690 Moderator on at

    Hi there, 


    Just to be super clear: are you looking for the last 90 days, or the last 3 months - and does that "last 3 months" include this month? (This month, last month, the month before, in full?) 

    I tried out this formula, and it brought back the dates of January 1st to April 1st. 

     

    ReviewDate ge '@{startOfMonth(getPastTime(3,'Month'))}' and ReviewDate lt '@{startOfMonth(utcNow())}'


    These are the dates on my list - and it only retrieved two of them - so it did it correctly:

     

    Rhiassuring_0-1650080688261.png

     

    Are you able to tell me - if your flow triggered on April 15th, what is the earliest date you would expect to see?

     

    Cheers,

     

    Rhia

     

  • nikola_bgd Profile Picture
    93 on at

    Hey, thanks for helping out! 

    90 days or 3 months, basically it doesn't make a lot of difference, any of the two would be good. 

    Last 3 months include this month.

  • Verified answer
    Rhiassuring Profile Picture
    8,690 Moderator on at

    Ah great! Then, the above formula should work for you. I used it in the Filter Query field of my Get Items action - you'd just replace ReviewDate with DueDate. Let me know how it goes.

  • nikola_bgd Profile Picture
    93 on at

    This works 🙂 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard