It's an simple and elegant routine, but it seems to have a rounding error. A valid result is:
60:10:60
This should be:
60:11:00
This effects both minutes and seconds.
I have added some very simple code at the end of my function:
if @Minute = 60
Begin
set @Degree = @Degree +1
set @Minute = 0
End
if @Second = 60
Begin
set @Minute = @Minute +1
set @Second = 0
End
BR
/Lars