On Sat, 2007-06-23 at 21:29 -0500, kvigor wrote:
> Good Day,
> 
> I'm chech if 24hrs has passed between these 2 datetimes:
> 
> $dTime1 = 2007-06-21 11:08:09;
> 
> $dTime2 = 2007-06-22 07:08:09;
> 
> I'd really like to convert the datetimes above into a format I can do 
> regular math them.

<?php

echo ($foo = strtotime( '2007-06-21 11:08:09' ))."\n";
echo date( 'Y/m/d H:i:s', $foo )."\n";

?>

$foo contains a unix timestamp (the time in seconds since the Epoch).

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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

Reply via email to