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 |
|
jim_cool
Starting Member
43 Posts |
Posted - 2006-01-24 : 07:10:15
|
| hi alli want to extract hours, min, seconds from datetime field from table.how can i do this in sql server 2000plz help me.also i want to compare two datetime fields using same format , how to do this?plz help me. Waiting for reply |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-01-24 : 07:14:05
|
| try thisselect convert(varchar,getdate(),108) |
 |
|
|
jim_cool
Starting Member
43 Posts |
Posted - 2006-01-24 : 07:24:30
|
| thanks for ur replybut , i still have doubt.the name of column in my table is Appointment . where shud i specify this column name?also how can i compare such datetime values using operators such as < & >.plz reply |
 |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2006-01-24 : 07:43:17
|
To extract hh:mm:ss from column Appointment use select convert(varchar,Appointment,108)For comparison the column itself should be good enough as long as you want the date and the time to be part of the comparisonie where Appointment > arbDateDuane. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|