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.)
Share
If you just need it in seconds, convert both to seconds (use the
strtotime()PHP function), then subtract one from the other.