cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dflemming
Helper I
Helper I

Get Items on sharepoint list where Modified is Today

Hello, having difficulty getting today's modified items. My odata filter looks like this

 

modified error.png

 

 

 

The format of utcNow is yyyy-MM-dd but when I use eq or ge no results are returned. 'Less than' works and returns everything in the list that is 'Approved'. Could anyone suggest an easier way  to do this?

 

Kind regards, Dale

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jay-Encodian
Community Champion
Community Champion

Hey @dflemming 

Try this expression: startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')

Full filter query: Status eq 'Approved' and Created gt 'startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')'

HTH

Jay

View solution in original post

Thanks Jay, I ran the date check alone and found some results. Then added the Approved condition after the date check and it worked. Thanks for the troubleshooting tip and the StartofDay() function. I know the order shouldn't affect it but I'm glad it working.

View solution in original post

4 REPLIES 4
Jay-Encodian
Community Champion
Community Champion

Hey @dflemming 

Try this expression: startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')

Full filter query: Status eq 'Approved' and Created gt 'startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')'

HTH

Jay

Many thanks, I've made the change however my result is still empty. I've pasted my filter in below.

 

Status eq 'Approved' and Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'

 

When I check the list there are definitely items created today.

 

Regards, Dale

Hey @dflemming 

I have just setup this list to test the query:

5.jpg

 SharePoint action configured as follows:

Filter query: Status eq 'Approved' and Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'

6.jpg

 And the data returned is correct:

7.jpg

 

The JSON:

8.jpg

 

Can you please verify your query by breaking it down, i.e. just filter on status, and then just filter on the Created field... if there is an issue with status you need to verify the internal field name via list settings.

HTH

Jay

 

Thanks Jay, I ran the date check alone and found some results. Then added the Approved condition after the date check and it worked. Thanks for the troubleshooting tip and the StartofDay() function. I know the order shouldn't affect it but I'm glad it working.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,681)