This is what I need to do: I need to perform a PHP operation, then retrieve how long ago the last time the operation was performed was. I have it all figured out, except one thing - how do I find the difference between two date/times? Or, is there an easier way to do this? (This is based in Wordpress, so I'm using wp_options to store the date/time data.)
+2
A:
If you just need it in seconds, convert both to seconds (use the strtotime()
PHP function), then subtract one from the other.
Kerry
2010-07-08 00:22:53