I have a field called ActualDuration which contains an Int value of seconds.
I have used the following select to convert it into a timestamp however I have noticed that the seconds value on my time stamp is not coming out correctly.
This is the select :
SELECT ActualDuration as ActualDuraion_in_seconds,
Cast((ActualDuration/3600) As nvarchar(3)) + ':' + RIGHT('0'+Cast(((ActualDuration % 3600)/60) As nvarchar(2)), 2) + ':' + RIGHT('0'+Cast(((ActualDuration % 3600) % 60) As nvarchar(2)),2) as Time
SITEID = 15140
Results are :
My problem is that if you take 462002 seconds on a calculator and /60 /60 to get time the result should be 128:33
Please can someone tell me why my select is wrong and the seconds part is giving me a different value of 128:20 in the result ?