cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Get Items based on Time in Microsoft Flow

Hi All,

 

I have a flow which retrives items from the sharepoint list based on date in the filter query. However I want to change to filter items between 3PM to 11:59PM only. I'm not sure how do I achieve this. Any help is appreciated.

 

Thanks.

 

Capture.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Get Items based on Time in Microsoft Flow

Hi @Anonymous,

 

If you want to use "time" as a filter for getting items, the specified field needs to contain time.

You could first format the date to "HH:mm" style using the formatDatetime() function.

Then use Filter array to filter the output of Get items.

Expression reference:

@and(greaterOrEquals(addHours(item()['Date'], -8, 'HH:mm'), '15:00'),lessOrEquals(addHours(item()['Date'], -8, 'HH:mm'), '23:59'))

Image reference:

3.PNG

Please take a try.

 

Best Regards,

Barry

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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Get Items based on Time in Microsoft Flow

Hi @Anonymous,

 

If you want to use "time" as a filter for getting items, the specified field needs to contain time.

You could first format the date to "HH:mm" style using the formatDatetime() function.

Then use Filter array to filter the output of Get items.

Expression reference:

@and(greaterOrEquals(addHours(item()['Date'], -8, 'HH:mm'), '15:00'),lessOrEquals(addHours(item()['Date'], -8, 'HH:mm'), '23:59'))

Image reference:

3.PNG

Please take a try.

 

Best Regards,

Barry

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
Anonymous
Not applicable

Re: Get Items based on Time in Microsoft Flow

Thank You. I'll try this solution now.

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Users online (4,772)