in reply to Converting Seconds to Nice Format
Warning: Untested code
use Date::Manip; $secs1 = time(); $secs2 = $secs1-(Read from file); $date1 = &ParseDateString("epoch $secs1"); $date2 = &ParseDateString("epoch $secs2"); $delta=&DateCalc($date1,$date2,\$err); # => 0:0:WK:DD:HH:MM:SS the weeks, days, hours, minutes, and seco +nds between the two $delta=&DateCalc($date1,$date2,\$err,1); # => YY:MM:WK:DD:HH:MM:SS the years, months, etc. between the two
____________________
Jeremy
|
|---|