jeeva Posted April 2, 2007 Share Posted April 2, 2007 hi frnds i need ur help... i have a form thats called Conference Room Booking. In that i need to asking the user to select the between time(like 5:30 to 6:30) Everything is ok. now my problem is i shud not allow the user to select the same time. for example Another user has been requseted the time between 5:30pm to 6:30pm .Now i shud not allow the following times thats 4:30 to 5:00 5:30 to 6:00 and so on i tried to solve this problem but i couldn't get the idea for that... any one have solved the same problem? if Yes let me know please... jeeva Quote Link to comment Share on other sites More sharing options...
obsidian Posted April 2, 2007 Share Posted April 2, 2007 There was a similar question asked last week, and here's what we came up with. There is a method you need to follow that will give you what you're after. Let's say that you have the user input their start and end dates: you need to run a query and see if any of four things are true of the date range inserted: Does the start time lie within the range of any existing events? Does the end time lie within the range of any existing events? Do any existing start times lie within the range of this new event? Do any existing end times lie within the range of this new event? If these four checks all return FALSE, you have a clean range, and you can successfully insert it into your schedule. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.