rgbcof
asked on
How to get days, hours, minutes, seconds from a large seconds value.
$num_of_seconds = 172870;
#how to get dd days, hh hours, mm minutes, and ss seconds? So it will be like 2 days 0 hours 1 minutes 10 seconds.
#how to get dd days, hh hours, mm minutes, and ss seconds? So it will be like 2 days 0 hours 1 minutes 10 seconds.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
my $num_of_seconds = 172870;
my($ss,$mm,$hh,$dd)=(gmtim
#the simplest way to extend it beyond 364 days may be to add another variable.