Quick Search:
 
 PHP Code: Convert Hours to Minutes Jump to:  
Category: >> PHP Code >> Convert Hours to Minutes  

<< lastnext >>

Snippet Name: Convert Hours to Minutes

Description: Simple hours to minutes conversion code.

Also see:
» Get Relative Dates and Times
» Calculate the difference between two t...
» Convert Minutes to Hours
» Convert Standard time to 24-hour time ...
» Days in month #2
» Days in month one
» Convert minutes to hours #2
» Convert minutes to hours one

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 16th, 2009

<?PHP
 
FUNCTION h2m($hours) { 
            $t = EXPLODE(".", $hours); 
            $h = $t[0]; 
            IF (ISSET($t[1])) { 
                $m = $t[1]; 
            } ELSE { 
                $m = "00"; 
            } 
            $mm = ($h * 60)   $m; 
            RETURN $mm; 
    } 
?>


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org