• dan-572483 (10/3/2013)


    It's going to represent the number of seconds, so the possible range is 00 to 59.

    one way is like the below. There may be a better method but this is the way i would use it.

    DECLARE @seconds INT = 5

    DECLARE @Stringlength INT = 2

    SELECT REPLACE(STR(@seconds,@Stringlength),' ','0')

    -- output = 05

    If you put anything greater than 9 it won't pad it with a 0 infront (e.g. 10 will be 10)