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 |
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2009-09-25 : 07:02:39
|
| Dear All,select emp_name,login_time,logout_time,datediff(mi,Login_Time,Logout_Time) as total_min,convert(float,datediff(mi,Login_Time,Logout_Time)/60) from TestI have tried to get hh diffrence but it is not showing actual workingi want diffrence 9:43 but system is showing on;y 9.Please help |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-09-25 : 07:07:28
|
| Try this:select emp_name,login_time,logout_time,datediff(mi,Login_Time,Logout_Time) as total_min,convert(decimal(6,2),datediff(mi,Login_Time,Logout_Time)/60.00) from Test |
 |
|
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2009-09-25 : 07:08:34
|
| Great it'w workingThanks alot |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-25 : 07:10:32
|
MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|