Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- converting date to minutes
April 15, 2005, 11:47 am
rate this thread
Re: converting date to minutes
Janwillem Borleffs wrote:
When that's your objective, you could do something like the following:
$ts = "200504161035";
$ts = strtotime(substr($ts, 0, 8) . " " . substr($ts, -4));
$minutes = round(($ts - time()) / 60);
Of course, you should substract $ts from time() when $ts is in the past.