Also if you're planning on doing regular math with the outputs it's pretty easy to check if it's been 24 hours if you're using a unix time stamp, if((larger - smaller) >= 86400) do something. ""kvigor"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Cool,

Like Ambien, It worked like a dream.


"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
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