I am searching for a way to find out if a period of time is between 2 DateTimes. For example, In a List I have period of time(start and end) time in an object. Like
Start: 16:00pm, End: 17.00pm
I have a Form which allows the User to add a period of time to this existing list. For example, in the form user can enter following:
Start : 16:30pm , End: 17:40pm
How can I check foreach Object in my List, if user entered time period doesn't already exist?
In this example user input 16:30 is between 16:00 and 17:00 and this should not be allowed. How can I do this?
Please do let me know it problem needs more explanation.