in reply to Re: Time Totaling re-explained
in thread Time Totaling re-explained
#-- Original return "$hours:$mins"; #-- Suggestion return $hours.':'.substr('00'.$mins,-2);
To see the difference, run the supplied sample with times of 5:33 and 4:33.
Update:
return sprintf("%d:%02d",$hours,$mins);
Just as good or better. *Smiles*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Time Totaling re-explained
by cLive ;-) (Prior) on Oct 25, 2001 at 20:53 UTC |