On Tue, May 10, 2005 at 12:54:26AM -0700, Harold Castro wrote:
> I need to compute the total elapsed time with this
> format:
>
> start end Total
>
> 06:30:17 09:00:14 2.50 hours
>
>
> Do you know any shortcut to this instead of splitting
> each number in between colons?
You can try with Date::Manip
------------------------------------------
use strict;
use warnings;
use Date::Manip qw(DateCalc Delta_Format);
my $start = '06:30:17';
my $end = '09:00:14';
my $diff = DateCalc($start, $end);
$diff = Delta_Format($diff, 2, ("%hd"));
print "$diff\n"
---------------------------------------------
It works fine for me...
HTH,
Eva
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>