Excel, handily, presents time as 18:00 but holds it internally as a decimal portion of 24 hours e.g. 0.75 . This code converts the decimal fractionback to 24 hour time
my $frac = shift;
my $hour = ($frac * 24) % 24;
my $minute = (($frac * 24) - $hour) * 60;
my $time = sprintf "%.2d:%.2d", $hour, $minute;