cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Merlin1
Resolver I
Resolver I

Filtering on Past Date established with interval

I am trying to modify a flow that runs daily to check for any records with a "Completed Date" field (Past Date) that is 183 days less than the current date.  The flow runs fine but I want to filter the results to eliminate any records where the "Completed Date" (Past Date) is greater than 365 days.  Here is the formula expression in the "List Project Follow-ups" step I am trying, but I get an error that the formula is invalid.

formatDateTime(body('Past_Date'),'yyyy-MM-dd') and formatDateTime(body('Past_Date'),'yyyy-MM-dd') lessOrEquals 'addDays(utcNow(),-365)' 
Also tried le instead of lessOrEquals with same error results.  Probably something simple but the above sure seems to me like it should work.  My flow is below (except for the email that is sent for qualified records).  Any help would be greatly appreciated.
Merlin1
Untitled picture.png
1 ACCEPTED SOLUTION

Accepted Solutions
Merlin1
Resolver I
Resolver I

I would delete this post but couldn't find a way to do that.  After posting I discovered the flow was accomplishing what I want because it is identifying only those records that match the exact Past Date determined in the Past Date step.  That is what I wanted.

Merlin1

View solution in original post

1 REPLY 1
Merlin1
Resolver I
Resolver I

I would delete this post but couldn't find a way to do that.  After posting I discovered the flow was accomplishing what I want because it is identifying only those records that match the exact Past Date determined in the Past Date step.  That is what I wanted.

Merlin1

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,210)