in reply to RE: RE: Convert seconds into a formatted ddd:hh:mm:ss string
in thread Convert seconds into a formatted ddd:hh:mm:ss string
$s=$t % 60; $t=($t-$s)/60; $m=$t % 60; $t=($t-$m)/60; $h=$t % 24; $d=($t-$h)/24; $out=sprintf "%03d:%02d:%02d:%02d\n", $d,$h,$m,$s; $out=~s/^0+:|00://g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: RE: Convert seconds into a formatted ddd:hh:mm:ss string
by husker (Chaplain) on Aug 31, 2000 at 18:07 UTC |