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 |
Easwar
Yak Posting Veteran
59 Posts |
Posted - 2007-03-24 : 03:08:46
|
In my table have LoginTime and LogOutTimei need how long time(hours/Minutes/Seconds) used in Userneed query.......... |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-24 : 03:23:39
|
[code]select time_used_in_hours = datediff(hour, LoginTime, LogoutTime), time_used_in_minutes = datediff(minute, LoginTime, LogoutTime), time_used_in_seconds = datediff(second, LoginTime, LogoutTime)from mytableor in decimalselect time_used_in_minutes = datediff(second, LoginTime, LogoutTime) / 60.0from mytable[/code] KH |
 |
|
Easwar
Yak Posting Veteran
59 Posts |
Posted - 2007-03-24 : 03:29:42
|
thanks very much |
 |
|
|
|
|