﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / How to convert integer to hours,mins and seconds / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 10:58:31 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to convert integer to hours,mins and seconds</title><link>http://www.sqlservercentral.com/Forums/Topic1057562-338-1.aspx</link><description>Thanks:-)</description><pubDate>Wed, 02 Feb 2011 11:04:02 GMT</pubDate><dc:creator>KS-321165</dc:creator></item><item><title>RE: How to convert integer to hours,mins and seconds</title><link>http://www.sqlservercentral.com/Forums/Topic1057562-338-1.aspx</link><description>Why bother with functions?:[code]DECLARE @starttime int = 80010	,@endtime int = 161500SELECT ((@endtime/10000 * 60) + (@endtime%10000/100))	- ((@starttime/10000 * 60) + (@starttime%10000/100))[/code]</description><pubDate>Wed, 02 Feb 2011 10:56:20 GMT</pubDate><dc:creator>Ken McKelvey</dc:creator></item><item><title>RE: How to convert integer to hours,mins and seconds</title><link>http://www.sqlservercentral.com/Forums/Topic1057562-338-1.aspx</link><description>Thanks.  I already have a date in a different column and I trying to calculate the number of minutes worked by an employee on a given date. I have the starttime as 80010 (integer) and endtime as 161500. The result I am looking for is 495 minutes. I believe I can achieve this result if I was able to convert startdate 80010 to 08:00:10 and endate to 16:15:00 and then using the datediff function to get the results in minutes.:-)</description><pubDate>Wed, 02 Feb 2011 10:07:58 GMT</pubDate><dc:creator>KS-321165</dc:creator></item><item><title>RE: How to convert integer to hours,mins and seconds</title><link>http://www.sqlservercentral.com/Forums/Topic1057562-338-1.aspx</link><description>Maybe:[code]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[/code]</description><pubDate>Wed, 02 Feb 2011 09:39:39 GMT</pubDate><dc:creator>Ken McKelvey</dc:creator></item><item><title>How to convert integer to hours,mins and seconds</title><link>http://www.sqlservercentral.com/Forums/Topic1057562-338-1.aspx</link><description>Hi,   I have the following integer 80010, All I want to do is convert this to 08:00:10 so I can use in a DateDiff function.Is there a time function which will do this or do I have to resort to breaking the number down and appending the ':'?Thanks :-)</description><pubDate>Wed, 02 Feb 2011 09:28:41 GMT</pubDate><dc:creator>KS-321165</dc:creator></item></channel></rss>