• I'm not sure what are you trying to do. However, a simple way to convert seconds in int to time would be like this.

    SELECT CAST( DATEADD( ss, 6974, 0) AS time)

    What happens when SUM is equal or greater than 86400 (seconds in one day)?

    You must use the SUM on the int value as it's not supported on time or datetime.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2