Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42747

[RESOLVED] Check to see if time overlaps

$
0
0
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.

Code:

If Date.Compare(orignalStart, toCheckStart) >= 0 And Date.Compare(orignalEnd, toCheckEnd) <= 0 Then
                isoverlap = True

This doesn't work. Can anyone point me to right direction? Thanks

Viewing all articles
Browse latest Browse all 42747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>