By: Jim
Date: 2003-09-23
Time: 06:06
|
Re: Minutes to Hours
Whn using this example below, I want to add total in each grid part, I do a htmlconv=no and add bold text to the total rows, that works but then the format part stops working (frm='0.0')
<td width="80" bgcolor="#F0F0F0">[blk_res.t;block=row;frm='0.0';htmlconv=no]</td>
---------------------------------------------------------------
$result[0] = array("country"=>"X", "tv_c"=>"Y", "tv"=>"361", "t"=>$T361/1000, "lkm"=>$QT361, "th"=>0, "th1"=>0, "h1"=>0, "h"=>0, "teknkaste"=>0, "kaste"=>0) ;
$result[1] = array("country"=>"X", "tv_c"=>"Y", "tv"=>"362", "t"=>$T362/1000, "lkm"=>$QT362, "th"=>$T362/1000/$HT362*60, "th1"=>0, "h1"=>0, "h"=>GetHour($HT362), "teknkaste"=>0, "kaste"=>0) ;
$result[3] = array("country"=>"X", "tv_c"=>"Y", "tv"=>"<B>Total<B>", "t"=>"<B>$TTOTAL</B>", "lkm"=>"<B>$QTTOTAL</B>", "th"=>"<B>0</B>", "th1"=>"<B>0</B>", "h1"=>"<B>0</B>", "h"=>"<B>0</B>", "teknkaste"=>"<B>0</B>", "kaste"=>"<B>0</B>") ;
|
By: Condutiarii
Date: 2003-09-25
Time: 22:54
|
Re: Minutes to Hours
Use the 'onformat' parameters like :
<td width="80" bgcolor="#F0F0F0">[blk_res.t;block=row;onformat='elapsedTime';htmlconv=no]</td>
and this function in your php code :
function elapsedTime($NomBloc,&$CurrRec)
{
$hours = round($CurrRec/60, 0);
$minutes = $CurrRec mod 60;
$CurrRec = (string)$hours."H".(string)$minutes
}
|