hi George, how did you find this thread in the huge I-Net and zillions of informations? wow...
Your meeting room db was a very good starting point to my own application. congrats! But, when i stumbled across the given minute-time-slots-code posted above i wondered what the reasons could have been by the developer to choose that kind of - well - "complicated"
solution.
I was unsure to adopt that alternative or choose another way.
The thread is about this way:1 new, planned appointment, lets say 03.31.03 08:00-10:00
1 old, existing appointment, lets say 03.31.03 09:00-11:00
Now, how to check for time collisions?
The idea
is New STARTDateTime > Old ENDDateTime
IF YES: no time collision
IF NO: 2nd check
[/list]
is New ENDDateTime < Old STARTDateTime
IF YES: no time collision
IF NO: time collision
[/list]
In our example above the first condition is FALSE
since 03.31.03 08:00 is not > 03.31.03 11:00
The second condition is FALSE too (the new appointment isnt ending before the start of the old existing appointment)
since 03.31.03 10:00 is not < 03.31.03 09:00
So its a one-liner:
if SDTnew > EDTold OR EDTnew < SDTold then
collision_flag$="no"
end if
(.."DT".. stands for = "DateTime")
Now im nearly finished with my project and im a little proud of it because it goes a bit further, mastering repeating appointments, fulltime events with >1 day and starting time > end time and so on and so on...
Thanks again for your DB as a very good starting point!!!
*bows*