Click here to Skip to main content
15,914,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
let us consider two ends of time
a=10:30
b=12:30


am getting a time from user c=11:45

how can i show that 11:45 is existing between avalue and b value in sql server 2005
Posted

Assuming you have table columns called startTime and endTime and the are both SQL Time fields, try:
SQL
SELECT * FROM myTable WHERE '11:45' BETWEEN startTime AND endTime
 
Share this answer
 
 
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