Possible Duplicate:
Efficient way to convert second to minute and seconds in sql server 2005
I have a query which needs to return the second in Day, Hour, Minute, Second format.
The below code works fine when its less than a day, but does not work, when the value in second is greater than a day
PRINT Convert(VarChar, DateAdd(S, 86400, 0), 108)
86400 is exactly a day and it returns 00:00:00
Can someone modify it and show me the result something like this
1:00:00:00.
Thanks