PDA

View Full Version : Select SUM( TIME ) FROM .....


jMac
05-20-2003, 07:57 PM
hi,
how do I get the result of the query "SELECT SUM( TIME_TYPE) ..
in the format "hh:mm:ss"

greetings
jMac

raf
05-20-2003, 09:34 PM
Welcome here.

how do I get the result of the query "SELECT SUM( TIME_TYPE) ..
in the format "hh:mm:ss"


I personally never ran a sum() on a timevariable. Be i assule you tryed it and just need it in the right format. How to do that depends on the variabels format in your db. Number of seconds? (There is a SEC_TO_TIME(seconds) function)
You'll probably find the answer here
http://www.mysql.com/doc/en/Date_and_time_functions.html