At 10:32 +0300 9/18/02, adi wrote:
>  Hi, I have a table table1, with a column "Duration" time type(ex 00:12:30)
>I want to make a sql selection:
>SELECT * from table1 WHERE condition, and after that, to make sum of values
>of column "Duration" and display it.
>Any Help?
>tx

To display as seconds:

SELECT SUM(TIME_TO_SEC(Duration)) FROM table1 ...

To display as a TIME value:

SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(Duration))) FROM table1 ...

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to