Hi;
I've been trying to comprehend the MySQL documentation for time calculations, but nothing I have tried so far works. I want to subtract one time from another and have the query result be total minutes...not formatted like "01:20:00".
Here is what I have so far...
mysql> SELECT ARRIVE, DEPART, TIMEDIFF(DEPART,ARRIVE) AS MINS FROM CALENDAR_DAYBLOCKS WHERE PLAN_ID!='';
+----------+----------+----------+
| ARRIVE | DEPART | MINS |
+----------+----------+----------+
| 13:40:00 | 15:00:00 | 01:20:00 | <-(I'd like this to read "80")
| 09:00:00 | 10:00:00 | 01:00:00 | <-(I'd like this to read "60")
| 09:40:00 | 10:00:00 | 00:20:00 | <-(I'd like this to read "20")
...etc., etc.
Can this be done in a mysql query directly or do I have to run the result through a php script (that, I can probably figure out).
Thanks.