SEC_TO_TIME Not Displaying in HH:MM:SS

Options

Hello! I am attempting to use the sec_to_time to convert my duration in seconds to HH:MM:SS although, I can not sum duration as it duplicates and when I apply just SEC_TO_TIME(`duration_seconds`) the calculation displays as 'count' and does not display as HH:MM:SS. When I do (SEC_TO_TIME(SUM(`duration_seconds`) it duplicates the numbers despite displaying in HH:MM:SS. Does anyone know how to get around summing to get the correct format to display?

Tagged:

Answers

  • DomoDork
    DomoDork Contributor
    Options

    @cmarino

    I did this a different way. I barrowed a trick that I used to use in excel for the same purpose. Try this:

    sec_to_time(sum(duration_seconds) / 86400)