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

Get Items filter by DATE AND TIME

Hi,

 

I am trying to build an ODATA Filter Query that will restrict the resukts from the list to all items that have the Status field = Approved and the Modified date = Today, but AFTER 4PM

 

so how can I do that?

 

here's what I've got, but it isn't working:

 

Status eq 'Requested' and Modified gt @{formatDateTime(utcNow(),'yyyy-MM-dd 16:00:00')}

 

 

how can I filter by Date and time please

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @livingstonep ,

 

If the type of Status column is choice, we could not configure it in Filter Query.

Besides, we need to add a single quote outside the expression.

Image reference:

39.PNG

Expression reference:

formatDateTime(utcNow(),'yyyy-MM-ddT16:00:00Z')

If the type of Status in choice, please try to use Filter array to filter items and you need to fill Status Value in the filter.

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
efialttes
Super User
Super User

Hi!

I would try the following

https://powerusers.microsoft.com/t5/Building-Flows/ODATA-Filter-for-SharePoint-Date-Time-field-issue...

Hope this helps 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-bacao-msft
Community Support
Community Support

 

Hi @livingstonep ,

 

If the type of Status column is choice, we could not configure it in Filter Query.

Besides, we need to add a single quote outside the expression.

Image reference:

39.PNG

Expression reference:

formatDateTime(utcNow(),'yyyy-MM-ddT16:00:00Z')

If the type of Status in choice, please try to use Filter array to filter items and you need to fill Status Value in the filter.

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

thanks, in fact the Status filter is already working fine - it's the filter finding only items that were approved after 4PM Today that is giving trouble

 

Hi @livingstonep ,

 

Thank you for your reply. So is the method in my previous reply helpful to you?

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,927)