cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alex5p
Level: Powered On

Getting data for exactly 3 months

I have a flow that will go grab any data in my sharepoint list that is either 1-90 days old. I am currently using this 

 

DateOfReferral ge  '@{addDays(utcNow(),-90)}' and DateOfReferral le '@{utcNow()}'

 

I have a button linked to this flow on powerapps that will allow a user to pull the data anytime from the sharepoint list, turn it into a csv and email it out. My issue is that it is pulling the data from today's date to 90 days old. so for instance right now if I run it. It will get the data from 8/13-11/13. I want it to actually be 8/1-10/31. Another example would be say the date is 12/15 and I run the flow I want the records for 9/1-11/30.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Getting data for exactly 3 months

Hi @alex5p 

 

This isn't exact but you'll get the idea as it will get you closer. Also, I am from the UK so kinda getting my head round your dates but looks like you want the whole quarter. This is how I do it...

 

DateOfReferral ge  '@{addDays(startOfMonth(UtcNow()),-90)}' and DateOfReferral le '@{addDays(startOfMonth(UtcNow()),-1)}'

 

You want to look at startOfMonth() and other Date and time functions to achieve your filter / goal

 

If you find my posts helpful, please mark with thumbs up

 

If this solves your issue, please click "Accept as Solution"

 

Any questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

1 REPLY 1
Super User
Super User

Re: Getting data for exactly 3 months

Hi @alex5p 

 

This isn't exact but you'll get the idea as it will get you closer. Also, I am from the UK so kinda getting my head round your dates but looks like you want the whole quarter. This is how I do it...

 

DateOfReferral ge  '@{addDays(startOfMonth(UtcNow()),-90)}' and DateOfReferral le '@{addDays(startOfMonth(UtcNow()),-1)}'

 

You want to look at startOfMonth() and other Date and time functions to achieve your filter / goal

 

If you find my posts helpful, please mark with thumbs up

 

If this solves your issue, please click "Accept as Solution"

 

Any questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,464)