45 = 0:00:45
241 = 0:04:01
575 = 0:09:35
and so on...
I have tried using the built-in CONVERT() function but always end up with StartDate + Integer and a time of 0:00:00.
Can anyone help please?
Cheers,
Roy
You can do:
declare @.seconds int
set @.seconds = 241
select convert(char(8), dateadd(second, @.seconds, ''), 114)
I took your example and turned it in to this which works:
SELECT CONVERT(char(8), DATEADD(second, Duration, ''), 114) AS Duration ...
Cheers,
Roy
No comments:
Post a Comment