Since those look like MySQL timestamps, I would suggest you do it in your
SELECT TO_DAYS(column1) - TO_DAYS(column2) AS Difference FROM table
Adapt to your needs.
Explain what your overall mission is and there is probably a query that'll
return just that.
If you want to use PHP, format those timestamps into something strtotime()
will convert to a unix timestamp, find the difference in seconds, and
convert the number of seconds into days.
----- Original Message -----
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Wednesday, June 05, 2002 11:01 AM
Subject: [PHP] days between two timestamps
> I have two different timestamps:
> Is there a simple way to get the number of days between the two dates?
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php