I would do the following (copy-paste the whole stuff below into immediate window / query window and execute)
DECLARE @foo int
DECLARE @unclefoo smalldatetime
SET @foo = DATEDIFF(minute, CAST('2013.01.01 00:00:00' AS datetime),CAST('2013.01.01 00:03:59' AS datetime)) -- AS 'Duration (Minutes)'
SET @unclefoo = DATEADD(minute, @foo, '2000.01.01')
SELECT CAST(@unclefoo AS time)
@foo
stores the value you generate in your question. The "trick" comes by then:
we create a smalldatetime
variable (in my case it's yyyy.mm.dd
format) and increment it with your int
value, then display (or store if you want) the time
part only.