I have two timestamps that are formated like this: substr( date( 'YmdHisu' ), 0, 17 )
20120921105240000
20120921115626000
Now, how do I compare them?
I tried to do a simple approach like:
$diff = abs( 20120921105240000 - 20120921115626000 );
But this doesn’t give me the needed result, since the time messes it up. All I want to do, is find out, how many minutes( or seconds ) have passed between them.
Thanks in advance.
Example
See extra info on the object and method.
For PHP < 5.3:
Method
sscanf+mktime:or
sscanf+vsprintf+strtotime:or multiple
substrstring operations +strtotime: