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 |
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-07-25 : 08:48:54
|
| hi all,i want the time difference for that iam taking two columns as in_time and out_timeand my select statement as followsselect datediff(hh,in_time,out_time)And my data table is as followstable:in_time out_time11:23:56 12:23:5310:24:56 12:45:60but i want the output in hh:mm:ss formateMalathi Rao |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-25 : 08:57:05
|
please post in appropriate forum. Script Library is for posting workable script for sharing, not for asking question.{MOD. Please move this} KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-25 : 09:08:27
|
[code]select convert(varchar(10), dateadd(second, datediff(second, in_time, out_time), 0), 108)[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-07-25 : 09:29:40
|
at your command sir topic moved._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-25 : 09:41:28
|
Thank you Sir Mod of CyberYak KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|