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 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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,374)