Log in

View Full Version : DateTime::diff



james438
03-27-2010, 12:51 PM
I already found a solution to my problem of detecting the difference between one date and another using MySQL's TIMESTAMPDIFF() function, but as I was looking for the solution I came across DateTime::diff (http://www.php.net/manual/en/datetime.diff.php) and I could not understand how to use this function.

Any ideas on how this would be used?

Then again the documentation says (PHP 5 >= 5.3.0) which I am only now realizing means "for PHP version 5.3.0 and newer" and I use 5.2.5.