cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
livingstonep
Kudo Commander
Kudo Commander

How to filter using Modified Date in Get Items Step

I have a Get Items step in my flow and want to only get items that have been Modified today

 

so in the filter query field I have tried:

 

Modified eq utcNow('yyyy-MM-dd')

 

It doesn't give an error but there are no records returned...

I have also tried

 

formatDateTime(Modified, 'yyyy-MM-dd') eq utcNow('yyyy-MM-dd')

 

but that formatDateTime is not accepted by the expression builder

So how do I use an ODATA Filter on the SharePoint List Modified field in the Get Items step?

 

1 ACCEPTED SOLUTION

Accepted Solutions
livingstonep
Kudo Commander
Kudo Commander

so finally I tried this

Status eq 'Generated' and Modified  ge '@{formatDateTime(addDays(utcNow(), -1), 'yyyy-MM-dd')}'

and it workd, returning the two records in the list that had been modifed today

View solution in original post

2 REPLIES 2
livingstonep
Kudo Commander
Kudo Commander

so finally I tried this

Status eq 'Generated' and Modified  ge '@{formatDateTime(addDays(utcNow(), -1), 'yyyy-MM-dd')}'

and it workd, returning the two records in the list that had been modifed today

View solution in original post

@livingstonep 

The reason that your second solution worked and the first one did not is that Created includes the time.  So to be returned an items date and time would need to be the same what you are comparing it against.  Also, I don't believe that your first try included the single quotes around the expression. I @ before the expression.

Glad that you got it working!

 

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,168)