6 Replies Latest reply on Dec 6, 2018 5:10 AM by B Kez

    24 hours format

    B Kez

      Hello everyone,

       

      I have recently changed my data source from excel to MySql database and the HH:mm:ss calculation is no longer working well -> Sum up hours over 24 hours

      From MySql database I have calculated the time into seconds and then applied in Tableau this calculation

       

      IIF([ctime_sec] % 60 == 60,0,[ctime_sec] % 60)// seconds

       

      + IIF(INT([ctime_sec]/60) %60 == 60, 0, INT([ctime_sec]/60) %60) * 100 //minutes

       

      + IIF(INT([ctime_sec]/3600) % 24 == 0, 0, INT([ctime_sec]/3600) % 24) * 10000 //hours

       

      Now instead of 02:58:50 as Grand Total, I get 01:76:50

       

      How can I fix that, please ?

       

      Thank you in advance for your help,

       

      Best,

       

      B