cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Collector
Kudo Collector

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
Highlighted
Community Support
Community Support

Re: Get Items filter by DATE AND TIME

 

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
Highlighted
Dual Super User III
Dual Super User III

Re: Get Items filter by DATE AND TIME

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!



Highlighted
Community Support
Community Support

Re: Get Items filter by DATE AND TIME

 

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

Highlighted
Kudo Collector
Kudo Collector

Re: Get Items filter by DATE AND TIME

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

Highlighted
Community Support
Community Support

Re: Get Items filter by DATE AND TIME

 

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,374)