This topic is locked

Elapsed Time

2/26/2013 8:57:17 AM
PHPRunner Tips and Tricks
R
rlarkinsmith author

I am trying to get a formula to work that will subtract a start time from an ending time to produce how much time has elapsed in minutes. Here is the event code that I have come up with, that I think should work, but of course it doesn't and I don't know where I have gone wrong. Anyone that can give me direction, I would be most grateful.
$start = strtotime("recoveryStart");

$end = strtotime("recoveryFinish");

$values ["recoveryTotal"] = round(abs($end - $start) / 60,2). " minutes";

R
rlarkinsmith author 2/26/2013

The following worked in phprunner 6.0. Hope this is helpful to someone else. Figured it out myself.
$data['recoveryTotal']=(strtotime $data['recoveryFinish']-strtotime $data['recoveryStart'])/"60"." minutes";