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

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,146)