I am making a program where you can book a room for certain amount of time. So lets say in my list i have following times saved :
1. Start time : 1:00 PM and End time 3:00 PM
2. Start time : 12:00 PM and End time : 12:59 PM
Now when i try to add a new time lets say Start time is 9:00 AM and End Time is 12:30 PM it should let me know that time are overlapping.
This doesn't work. Can anyone point me to right direction? Thanks
1. Start time : 1:00 PM and End time 3:00 PM
2. Start time : 12:00 PM and End time : 12:59 PM
Now when i try to add a new time lets say Start time is 9:00 AM and End Time is 12:30 PM it should let me know that time are overlapping.
Code:
If Date.Compare(orignalStart, toCheckStart) >= 0 And Date.Compare(orignalEnd, toCheckEnd) <= 0 Then
isoverlap = True