Skip to main content

Notifications

Power Apps - Building 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:
  • Re: Filter with range date

    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 

     

     

  • Verified answer
    Giorgio67 Profile Picture
    Giorgio67 145 on at
    Re: Filter with range date

    Hi @Nogueira1306 

    many thanks for your replay

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

  • Nogueira1306 Profile Picture
    Nogueira1306 7,390 on at
    Re: Filter with range date

    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!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard