Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shukla_dh
Starting Member
9 Posts |
Posted - 2010-06-17 : 05:40:45
|
I have one table Employee which store employee birthdate which contains birth date and time both. Select * from Employee Result should like ID Name BirthDate 1 ABCD 2000-01-01 19:00:00.0002 XYA 2000-01-01 05:15:00.000Now i want to make query on employee table where birthtime is either more then 02:00 and less then 15:00 or any kind of comparison operator. Do you have any idea.Dhaval Shukla.Net Developer |
|
|
SD_Monkey
Starting Member
38 Posts |
Posted - 2010-06-17 : 06:22:40
|
| @cond1 datetime @cond2 datetimewhere birthtime between @cond1 AND cond2hope this can help....A maze make you much more better |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-06-17 : 06:24:01
|
| select * from employee where datepart(hh, birthdate) between 2 and 15- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
|
|
|
|