Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select records from between two times?

Status
Not open for further replies.

T1M

Programmer
Jul 3, 2001
14
0
0
CA
Hello,

I am looking for help with an SQL Problem. I have two times and I would like to pull records out of the table where one column's value is between the two times. The table column is SQL Server 7.0 datetime. Currently the value in the table is (date + time) where the date is set to "1/1/1900" in all cases and the time is variable.

I would like something like:
SELECT * FROM tablename WHERE MyTime BETWEEN '09:00' AND '13:00'

Thanks,
Tim
 
Don't worry about answering this one...

I used the Convert() function to change all the appropriate values to the same type so they could be compared.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top