web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Another 'filter' quest...
Power Apps
Unanswered

Another 'filter' question.

(1) ShareShare
ReportReport
Posted on by 63

I have seen plenty of questions and answers, re: filtering between two dates but none specific to my issue.

 

I am filtering a gallery were the clocked time was between to date pickers. My code is:

Filter(Employment_Time, 'Time IN' >= DatePicker_Start.SelectedDate && 'Time IN' <=DatePicker_End.SelectedDate)
 
The results are strange:
1. dates set to Jan 01 2024 - Jan 02 2024 = only records on Jan 01
2. dates set to Jan 01 2024 - Jan 03 2024 = records for Jan 01 AND Jan 02
 
I assume that <= should include all dates before and ON the date chosen. Where am I wrong?
 
Thanks in advance.
Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 1 on at

    Hi @JoelL 

     

    Try this just as a workaround:

     

     

    Filter(
     Employment_Time, 
     'Time IN' >= DatePicker_Start.SelectedDate && 
     'Time IN' < DateAdd(DatePicker_End.SelectedDate, 1, Days)
    )

     

    I believe this had to do with the date format a topic that already got tackled on the forum:https://powerusers.microsoft.com/t5/Building-Power-Apps/Filtering-a-Gallery-using-two-date-fields-from-a-SharePoint-list/td-p/514726

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • JoelL Profile Picture
    63 on at

    Thank you but with your addition, on my end, it's the same. If want to include the 2nd, I must set the end date to the 3rd.

  • JoelL Profile Picture
    63 on at
    In case anyone else struggles with this, I was able to make it work (with the help of the folks at PowerApps911, by wrapping it in datevalue and text.
     
    Original code :
     
    Filter(Employment_Time, 'Time IN' >= DatePicker_Start.SelectedDate && 'Time IN' <=DatePicker_End.SelectedDate)
     
    Becomes:
    Filter(Employment_Time,'Time IN'>= (DatePicker_Start.SelectedDate) && DateValue(Text('Time IN',DateTimeFormat.ShortDate)) <= (DateValue(Text(DatePicker_End.SelectedDate,DateTimeFormat.ShortDate))))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard