in reply to 'Difference between two dates in a ss:mm:hh etc format?'
At any rate, Date::Manip (does not require compilation) appears to cover all of the contingencies in your problem. From the Date::Manip docs:
4. The amount of time between two dates. $date1=&ParseDate($string1); $date2=&ParseDate($string2); $delta=&DateCalc($date1,$date2,\$err); => 0:0:WK:DD:HH:MM:SS the weeks, days, hours, minutes, and seconds between the two $delta=&DateCalc($date1,$date2,\$err,1); => YY:MM:WK:DD:HH:MM:SS the years, months, etc. between the two
In the interests of being specific, how exactly is this not meeting your needs?
Cheers,
Matt
|
|---|