Is there a command to display number of seconds as hrs:min:seconds?

Mark Waddingham mark at livecode.com
Thu Oct 17 06:21:32 EDT 2019


On 2019-10-17 10:50, Klaus major-k via use-livecode wrote:
> save some lines by setting the numberformat first (lazy moi :-)
> 
> ...
> 

Save even more lines by using format, div and mod...

function formatRemainingTime pSeconds
   return format("%02d:%02d:%02d", pSeconds div 3600, (pSeconds mod 3600) 
div 60, pSeconds mod 60)
end formatRemainingTime

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list