Calculated time in seconds, now you need to translate seconds into decimal so that you can see the work time, for example, as 0.25 hours. I won’t figure out how to use the CONVERT function CONVERT

 SUM((DATEPART(hh, rd)*3600)+(DATEPART(mi, rd)*60) + (DATEPART(ss, rd))) as vremya 

    2 answers 2

    Time in hours = 1 / (3600 / Time in seconds)

    That is, in your example: a = 900 (90 seconds = 15 minutes = 0.25 hours)

    Time in hours = 1 / (3600/900) = 1/4 = 0.25 hours

    Well, I think you will translate the code yourself;)

    • try, thank you - Toshka

    in one hour 60 * 60 = 3600 seconds. the ratio of the calculated time in seconds to the number of seconds in one hour will be the solution

     SELECT vremya/3600. (с точкой на конце)