Sunday, 11 August 2013

summing time column in mysql

summing time column in mysql

I have a column in one of my tables, which is TIME format (00:00:00). I am
trying to sum the entire column and display it as same (00:00:00).
I have tried using the following but it is not giving me anywhere near the
correct answer.It's giving me 22.12:44:00 and manual calcaulation tells me
it should be close to 212:something:something
SELECT SEC_TO_TIME( SUM( TIME_TO_SEC( vluchttijd ) ) ) AS totaltime FROM
tbl_vluchtgegevens
Any recommendations?

No comments:

Post a Comment