Re: time calcs
| From: | Jason Wong | Date: | Sun, 29 Jun 2003 19:51:25 +0000 |
| Subject: | Re: time calcs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-153332@lists.php.net to get a copy of this message | ||
On Monday 30 June 2003 03:19, Larry R. Sieting wrote:
> I am trying to get a time calculation using:
>
> $tot_time = ($data['end_time'] - $data['start_time']);
>
> The end_time & start_time are stored in a db as column type of time.
>
> I want to output the difference as a difference expressed in time
> format: 10:05:23 - 09:45:32 = 00:39:51
>
> Do I need to break the stored time values apart and do calcs on each
> segment? I am not storing the calculated time.
Your DBMS may very well have time date/time functions built-in that can do
this for you.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Include me out.
*/