You need to read the manual on date and time functions.
Convert each to seconds, subtract, and convert back to time.
You may have another problem, though.
You can't calculate an interval based solely on time.
You need the date too, unless all transactions are less than 24 hours in length.

Paul Choy wrote:

Hi :

I am trying to calculate the time span of listing a large table database in mysql and I run into trouble where I am trying to use curtime() - value stored in startime.But I do not know how to get the stored value out from startime.Does anybody knows how I can get value out from startime where I can do subtraction. Thanks


mysql> select * from time;
+----------+
| startime |
+----------+
| 17:06:35 |
| 17:09:39 |
| 00:00:00 |
| 13:27:49 |
| 15:04:52 |
+----------+
5 rows in set (0.00 sec)




---------------------------------------------------------------------
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