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 / Filter with range date
Power Apps
Answered

Filter with range date

(0) ShareShare
ReportReport
Posted on by 145

Hi everybody

I'm going crazy with the filter.  part of code:

Set(DataFrom; DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value);Value(MinuteValue1.Selected.Value);0));;
Set(DataTo; DateValue2.SelectedDate + Time(Value(HourValue2.Selected.Value);Value(MinuteValue2.Selected.Value);0));;

ClearCollect(collBook; (Filter(BookingCar; DataStart >= DataFrom && DataEnd<= DataTo && DataStart <= DataTo )));;

.............

The user insert days and hour.

Example: book from 10/01/2022 08:00 to 10/01/2022: 15:00

If I book for example from 10/01/2022 08:00 to 10/01/2022: 10:00 it's work; but

If I book from 10/01/2022 09:00 to 10/01/2022: 10:00 it doesn't work.

Help me ☹️

Many thanks

 

 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Try this: 

     

    ClearCollect(collBook; (Filter(BookingCar; DataStart >= DataFrom && DataEnd<= DataTo )));;

     

    Plus, do you really need the hours? Why dont you filter without hours?


    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Verified answer
    Giorgio67 Profile Picture
    145 on at

    Hi @Nogueira1306 

    many thanks for your replay

    Your code It has been the first things I done but it doent' work

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Giorgio67,

    Could you please describe more about your need, filter out the booking available records?

    Tell me which need do you want to achieve:

    1). make the booking available all the time during 10/01/2022 08:00 to 10/01/2022: 15:00 

    2). make the booking available only for the spare time during 10/01/2022 08:00 to 10/01/2022: 15:00 

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard