I needed a nice way to get a readout of various values of seconds that could be anywhere from 1 or 2 seconds to several thousand seconds. My solution will give an appropriate readout depending on the number of seconds involved. Here is the code in case anyone else needs a similar solution:

**dayhrminsec(TIME)**

**Parameters**

This function has one parameter:

* time* – the number of seconds.

**Description**

The dayhrminsec( function converts a time (number of seconds) into an appropriate expanded text value showing days, hours, minutes and seconds while eliminating any element with a 0 value.

dayhrminsec(597445) ☞ 6 days:21 hr:57 min:25 sec

dayhrminsec(9248) ☞ 2 hr:34 min:08 sec

dayhrminsec(86410) ☞ 1 day:10 sec

Note: This function is equivalent to:

arraystrip(arrayfilter(?(val(timepattern(time,“hh”))>23,

pattern(int(time/86400),"# day~")+

timepattern(time-(int(time/86400)*86400),":hh hr:mm min:ss sec"),

timepattern(time,“hh hr:mm min:ss sec”)), “:”,

{?(val(striptonum(import()))=0,"",import())}),":")