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
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
many thanks for your replay
Your code It has been the first things I done but it doent' work
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!