cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Resolver III
Resolver III

Gallery filter with start and end times

Hi all,

 

I''ve a collection in my app where I've Items that hits all records that have a startdate of today OR have an enddate/time today. That's working fine.

 

Now I want to filter this collection in my gallery as follow:

If start time is between 8.00 and 8.59 it should be showed (works fine)

If end time is 8.00 > it should not showed (Works fine)

If end time is for example 8.30 > it should be showed, this is NOT working.

 

I've the following filter on my gallery:

Filter(Tasks.AllItems,Hour('Startdate (startdate)') = 8 Or Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)') >8 And Minute('Enddate (enddate)')>1 Or Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)')>8 ))

 

Anyone an idea how to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
dennisb88
Resolver III
Resolver III

I just figured it out by myself.

The correct filter is:

    Hour('Startdate (Startdate)') = 8 Or Hour('Startdate (Startdate)') <= 8,
    Hour('Enddate (enddate)') > 8 And Minute('Enddate (enddate)') > 1 Or Hour('Startdate (Startdate)') <= 8,
    Hour('Enddate (enddate)') > 8 Or Hour('Startdate (Startdate)') <= 8,
    Hour('Enddate (enddate)') >= 8 And Minute('Enddate (enddate)') >= 1 Or Hour('Startdate (Startdate)') = 8,
    Hour('Enddate (enddate)') >= 8

 

View solution in original post

3 REPLIES 3
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @dennisb88 ,

 

Is it because of the extra round bracket in the end. Try below code if it helps in your case. 

Filter(Tasks.AllItems,Hour('Startdate (startdate)') = 8 Or 
        Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)') >8 And 
		Minute('Enddate (enddate)')>1 Or 
		Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)')>8 )

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 ,

Thank you for your reply.

 

Sorry the bracket was a typo from me.

 

What is not working now, is still the case that I want also show items that start for example at 7.30 end ends at 8.30. That item is not showed up at the moment.

 

I think it's something in my filter, but I don't know how to show it.

 

Does you know how to add that specific part to my formula?

Regards,

Dennis.

dennisb88
Resolver III
Resolver III

I just figured it out by myself.

The correct filter is:

    Hour('Startdate (Startdate)') = 8 Or Hour('Startdate (Startdate)') <= 8,
    Hour('Enddate (enddate)') > 8 And Minute('Enddate (enddate)') > 1 Or Hour('Startdate (Startdate)') <= 8,
    Hour('Enddate (enddate)') > 8 Or Hour('Startdate (Startdate)') <= 8,
    Hour('Enddate (enddate)') >= 8 And Minute('Enddate (enddate)') >= 1 Or Hour('Startdate (Startdate)') = 8,
    Hour('Enddate (enddate)') >= 8

 

View solution in original post

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,919)