Home Forums SQL Server 2005 T-SQL (SS2K5) How to convert integer to hours,mins and seconds RE: How to convert integer to hours,mins and seconds
Ken McKelvey
SSCoach
Points: 18769
More actions
February 2, 2011 at 9:39 am
#1281523
Maybe:
DECLARE @time int, @dt datetime;
SET @time = 80010;
SET @dt = DATEADD(second, 80010%100,DATEADD(minute, 80010%10000/100,DATEADD(hour, 80010/10000,'19000101')));
SELECT @dt