MySQL add time values
Thursday, 22. June 2006, 06:52:30
SELECT SEC_TO_TIME( SUM( TIME_TO_SEC( `duration` ) ) ) AS total_time FROM training;
as in e.g.:
SELECT date(`datum`), TIME(`dauer`) as duration, `km`, SEC_TO_TIME(TIME_TO_SEC(`dauer`)/`km`) as 'km/m' FROM training GROUP BY datum;
16:15 cprior * Kool-Aid: I bought me a heart rate monitor for my excercises today!
16:15 cprior * Haven't owned one in 10 years
16:16 cprior * they became incredibly cheap, I bought one "on impulse"
16:18 cprior * I got one without those fancy "download to PC and cellphone" feature.
16:18 cprior * I will never, ever sink data in a proprietory, binary format
16:19 cprior * so if they don't write "exportable to text-files" all over the package I refuse...
16:19 cprior * If I /really/ wanted to keep track of my excersises I could always put it ina database table
as in e.g.:
SELECT date(`datum`), TIME(`dauer`) as duration, `km`, SEC_TO_TIME(TIME_TO_SEC(`dauer`)/`km`) as 'km/m' FROM training GROUP BY datum;
16:15 cprior * Kool-Aid: I bought me a heart rate monitor for my excercises today!
16:15 cprior * Haven't owned one in 10 years
16:16 cprior * they became incredibly cheap, I bought one "on impulse"
16:18 cprior * I got one without those fancy "download to PC and cellphone" feature.
16:18 cprior * I will never, ever sink data in a proprietory, binary format
16:19 cprior * so if they don't write "exportable to text-files" all over the package I refuse...
16:19 cprior * If I /really/ wanted to keep track of my excersises I could always put it ina database table

