Steve, thank you very much. I did not know about the int operator. Works like a charm. Thank you very much.<br><br><br>Have a great night!<br><br><br><br><b><i>Steven Lembark <lembark@wrkhors.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Richard Reina wrote:<br>> After over an hour of googling and searching in my Lama, Camel and Ram<br>> books I still am unable to find a way to convert<br>><br>> 13.32 to: thirteen hours and nineteen minutes<br>><br>> my $time_sring = 13.32;<br>><br>> my $hrs = sprintf "%0d", $time_string; # works. I get 13<br>><br>> but I can't figure out how to get .32 so that I can multiply it time 60<br>> and then round it so that I can print out:<br>><br>> thirteen hours and nineteen minutes<br><br> my $time = 13.32;<br><br> my $hours = int $decimal_time;<br><br> my $min = ( $decimal_time -
$hours ) * 60;<br><br> my $timestr = sprintf '%02d:%02d', $hrs, $min;<br><br>-- <br>Steven Lembark 85-09 90th St.<br>Workhorse Computing Woodhaven, NY, 11421<br>lembark@wrkhors.com +1 888 359 3508<br>_______________________________________________<br>Chicago-talk mailing list<br>Chicago-talk@pm.org<br>http://mail.pm.org/mailman/listinfo/chicago-talk<br></blockquote><br><BR><BR>Your beliefs become your thoughts. Your thoughts become your words. Your words become your actions. Your actions become your habits. Your habits become your values. Your values become your destiny. -- Mahatma Gandhi