Time to Second Sum Aggregation

I am having an issue with summing 4 different time to second functions. I have 4 different souces of time in the format of HH:MM : SS which were imported in as text and thus converted to seconds and then minutes. I'm unsure why they cannot sum as they should come out as whole numbers of minutes and when used seperately, they come out as a number. Why am I unable to sum them? 

 

Beastmode function is below: 

SUM((TIME_TO_SEC(`Time1`) / 60),(TIME_TO_SEC(`Time2`) / 60),(TIME_TO_SEC(`Time3`) / 60),(TIME_TO_SEC(`Time4`) / 60))

Best Answer

  • Aditya_Jain
    Accepted Answer

    Hi Giolaj,

     

    I am not getting into the logical part of the solution, just trying to suggest a syntax here, Please try doing this,
    SUM(TIME_TO_SEC(`Time1`) / 60) +
    SUM(TIME_TO_SEC(`Time2`) / 60) +
    SUM(TIME_TO_SEC(`Time3`) / 60) +
    SUM(TIME_TO_SEC(`Time4`) / 60)

     

    Hope this helps

     

    Regards

    Aditya Jain 

Answers