Espero te sirva.... Saludos,
Código HTML:
DECLARE @TOTAL_SEC INT,
@HOUR INT,
@MINUTE INT,
@Second INT
SELECT @TOTAL_SEC = 814386
SELECT @HOUR = DATEDIFF(HOUR, '19000101 00:00:00.000', DATEADD(SECOND, @TOTAL_SEC, '19000101 00:00:00.000'))
SELECT @TOTAL_SEC = @TOTAL_SEC - (@HOUR * 60 * 60)
SELECT @MINUTE = DATEDIFF(MINUTE, '19000101 00:00:00.000', DATEADD(SECOND, @TOTAL_SEC, '19000101 00:00:00.000'))
SELECT @TOTAL_SEC = @TOTAL_SEC - (@MINUTE * 60)
SELECT @Second = DATEDIFF(Second, '19000101 00:00:00.000', DATEADD(SECOND, @TOTAL_SEC, '19000101 00:00:00.000'))
SELECT @HOUR, @MINUTE, @Second