cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Between times Filter not working

I am trying to only show items  within today  if the start time and end time is today since this is being displayed on Sharepoint. 

the gallery does not change no matter if i use Now as well which i think should work. 

 

Sort(Filter('PTO Calendar', 'Start Time' <=Today() && 'End Time' >=Today()), SortOrder.Descending)

 

 

26 REPLIES 26
Highlighted
Advocate I
Advocate I

Re: Between times Filter not working

Looks like its a logic issue as the 'start time' is less than or equal to and the 'End Time' is greater than or equal to.

 

So try that:

Sort(Filter('PTO Calendar', 'Start Time' >=Today() && 'End Time' <=Today()), SortOrder.Descending)

 

I would also say that Today() should be stored in a variable as it will help with delegation.

Highlighted
Frequent Visitor

Re: Between times Filter not working

Now it brings nothing back from the list so i must be missing something else since that is coming from a SharePoint List 

Highlighted
Impactful Individual
Impactful Individual

Re: Between times Filter not working

Hi @Nix23 

If you want it to show only if start time and end time are both today then use:

Sort(Filter('PTO Calendar', IsToday('Start Time') && IsToday('End Time'), SortOrder.Descending)

 

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

Re: Between times Filter not working

That trows errors that the filter is not closed and no matter where i put the closing )  it still errors  

Highlighted
Impactful Individual
Impactful Individual

Re: Between times Filter not working

Sorry, I left out a bracket, my bad.

I get delegation warnings, but not errors.

Can you please share your formula, with the errors?

Annotation 2019-12-19 121038.png

Highlighted
Frequent Visitor

Re: Between times Filter not working

i am Getting a message that the thisitem.Title from the SharePoint list

 

PA20.jpg         PA19.jpg 

Highlighted
Impactful Individual
Impactful Individual

Re: Between times Filter not working

Your Sort currently says "SorSort"

Highlighted
Frequent Visitor

Re: Between times Filter not working

Fixed that and now its blank and i know there are items in the list with a Start Date and End date.  

 I can only guess it does not like the format of the date/Time  in the list but not 100% that's it. 

 

PA22.jpgPA21.jpg

Highlighted
Advocate I
Advocate I

Re: Between times Filter not working

Sharepoint dates were meant to be delectable by now but alas are not.

What I would suggest is a mod to your data source to have a column named Day and write today() in that column when the record is created. Either that or use Flow to do it.

That way you can just call today to return the records then sort. I would also say collect the data before you sort too.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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