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 Apps / Microsoft Flow Date an...
Power Apps
Answered

Microsoft Flow Date and Time Filtering

(0) ShareShare
ReportReport
Posted on by 39

Hi All, 

 

can anyone tell me why this would not work?

 

Scenario:

i have a list and i want a flow to run only on items that have been updated in the last 2hrs. 

 

so i'm comparing utcNow() with modified, i tried to convert utcNow() to different formats but nothing is working. 

 

This is what i have so far:

addHours(utcNow(), 2, 'yyyy-MM-ddTHH:mm:ssZ')

I get the following Status code: 

400
and error body:
{
"status": 400,
"message": "The expression \"Modified lt 2019-04-03T19:06:52Z\" is not valid.\r\nclientRequestId: \r\nserviceRequestId: "
}
 
Thanks in advance.
Ask.png
Categories:
I have the same question (0)
  • Verified answer
    LRVinNC Profile Picture
    2,297 on at

    Check out Scenario #2 in this blog.  It is using AddDays but the syntax is the same for AddHours.  I think you have your date and increment reversed.

    https://flow.microsoft.com/en-us/blog/advanced-flow-of-the-week-filtering-with-odata/

     

    I believe the syntax you are looking for is 

    addhours(utcNow('yyyy-MM-ddTHH:mm:ssZ'),-2
    and I think you need to test that Modified is gt, not lt the result.  

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard