Calculation and conversion of days, hours, minutes, seconds