Click here to Skip to main content
14,335,049 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 2

Assuming you have table columns called startTime and endTime and the are both SQL Time fields, try:
SELECT * FROM myTable WHERE '11:45' BETWEEN startTime AND endTime
   
Rate this:
Please Sign up or sign in to vote.

Solution 1

   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100