Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two dropdown list, both are filled with 30mins intervals eg:9:00AM ,9:30AM...etc to 5:30PM how can i validate this with the following condition...


1)From time must be less than To time.(time format 12hrs with AM & PM)
2)If a program is scheduled for 10:00AM to 11:00AM, then another program can't be scheduled for 10:30AM to 11:30AM for the same date

What I have tried:

I tried only for twenty four hours format. but i don't have any idea for above provided condition...plz provide me the correct solution...
Posted
Updated 26-Jun-16 21:06pm
v2

1 solution

You should use a Date (Java Platform SE 7 )[^] object, which provides methods for comparing different values.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900