Fat Galah NewsFat Galah NewsFat Galah BlogFat Galah Client Login
Fat Galah Internet Design Studios
103 Burrendah Road, Jindalee, QLD

Local call: 1800 99 33 99 (Australia Only)
International Ph: +61 7 3715 5999
Ph: 07 37155999

Converting Minutes to Hours

December 8th, 2008

Simply function to convert minutes to hours. This PHP function will convert mintues into hours

//$time = total minutes

function fMinutes2Hours($time)
{
 $seg = explode(".", ($time/60));
 $hrs = $seg[0] ;
 $min = $time - ($seg[0]*60);
 $min = $min <= 9 ? '0'.$min : $min;
 return $hrs.':'.$min;
}


 

1 Response For "Converting Minutes to Hours"
Alex Says:
January 12th, 2009
Thanks. This is just what I've been looking for.

Leave A Comment:

Name:(Required)
XHTML ValidationCSS Validation