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: 18766
More actions
February 2, 2011 at 10:56 am
#1281565
Why bother with functions?:
DECLARE @starttime int = 80010
,@endtime int = 161500
SELECT ((@endtime/10000 * 60) + (@endtime%10000/100))
- ((@starttime/10000 * 60) + (@starttime%10000/100))