Subtraction of two units of time.
| From: | David Rice | Date: | Thu, 06 Mar 2003 20:38:47 +0000 |
| Subject: | Subtraction of two units of time. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-26138@lists.php.net to get a copy of this message | ||
I want to take away two times stored in the format "00:00:00" in a mysql database, i retrieve the times and take them away by using the following
$total = $time1 - $time2 ;
when i echo the total it is a whole number of the hours.. and does not take the minutes into account, anyone have an idea of how to get an exact answer to 2decimal places of the subtraction of the two times?
cheers,
dave
_________________________________________________________________
Chat online in real time with MSN Messenger http://messenger.msn.co.uk