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 |
|
klegrand
Starting Member
29 Posts |
Posted - 2007-04-06 : 06:02:32
|
| I have a number of seconds.I need to return this in hours, minutes and seconds.Example : 1861 seconds is 5 hours, 1 minute and 1 secondIs there a special SQL command for this ?Thanks a lot... |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-06 : 06:30:35
|
| What? 1861 seconds is 31 minutes and 1 second.SELECT CONVERT(VARCHAR, DATEADD(SECOND, 1861, 0), 108)Peter LarssonHelsingborg, Sweden |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-06 : 06:34:02
|
| 18061 is 5 hours, 1 minute and 1 second.Peter LarssonHelsingborg, Sweden |
 |
|
|
klegrand
Starting Member
29 Posts |
Posted - 2007-04-06 : 06:51:28
|
| Thanks Peter,That's the instruction that I was looking for...I forget indeed the '0' in my example ;-) |
 |
|
|
|
|
|