Hi all,

> Am 17.10.2019 um 02:41 schrieb Terry Judd via use-livecode 
> <use-livecode@lists.runrev.com>:
> 
> Not built-in but...
> 
> function formatRemainingTime pTime
>   put trunc(pTime/3600) into tHours
>   put pTime mod 3600 into tTimeX
>   put trunc(tTimeX/60) into tMins
>   put tTimeX mod 60 into tSecs
>   if tHours < 10 then put "0" before tHours
>   if tMins < 10 then put "0" before tMins
>   if tSecs < 10 then put "0" before tSecs
>   return tHours&":"&tMins&":"&tSecs
> end formatRemainingTime

save some lines by setting the numberformat first (lazy moi :-)

function formatRemainingTime pTime
   set the numberformat to "xx"
   put trunc(pTime/3600) into tHours
   put pTime mod 3600 into tTimeX
   put trunc(tTimeX/60) into tMins
   put tTimeX mod 60 into tSecs
   return tHours&":"&tMins&":"&tSecs
end formatRemainingTime


Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to