I am trying to format seconds into hours. I am using the following:
dateadd(ss,sum(cast(duration as int)) ,'12/31/2099')
this gives me a value of 12/31/2099 00:00:00.000.
the problem falls when the sum of the seconds falls greater than 24 hours. instead of getting a value like 12/31/2099 27:49:15.000, I get 01/01/2100 03:49:15.000.
Does anybody know how to get the value in hours only. I have tried to convert to get the 27 but I still got the wrong time. It always adds a day to the time instead of just giving me the value of hours the time represents.
Thanks for your help.
dateadd(ss,sum(cast(duration as int)) ,'12/31/2099')
this gives me a value of 12/31/2099 00:00:00.000.
the problem falls when the sum of the seconds falls greater than 24 hours. instead of getting a value like 12/31/2099 27:49:15.000, I get 01/01/2100 03:49:15.000.
Does anybody know how to get the value in hours only. I have tried to convert to get the 27 but I still got the wrong time. It always adds a day to the time instead of just giving me the value of hours the time represents.
Thanks for your help.