Thanks! Worked perfectly!

-Chris

On Sunday, August 11, 2002, at 09:27 AM, Matt wrote:

>> From: "Christopher Molnar" <[EMAIL PROTECTED]>
>> Sent: Saturday, August 10, 2002 11:37 AM
>> Subject: [PHP] subtracting 2 time strings
>
>
>> Help!
>>
>> I can't find reference to it in the manuals but I need to subtract to
>> time strings.
>>
>> ex:
>>
>> time_in = 11:00
>> time_out = 13:45
>>
>> job_time = 2:45
>
> Something like:
> <?php
> $time_in = "11:00";
> $time_out = "13:45" ;
> $start = strtotime($time_in);
> $finish = strtotime($time_out);
> $elapsed = $finish - $start;
> echo 'Elapsed time was ' . gmdate('H:i:s',$elapsed) . "<br>\n";
> ?>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to