Perhaps the dateItems format would get you part of the way there. It seems like I have reinvented this in the past several times.
> On Oct 16, 2019, at 6:41 PM, Terry Judd via use-livecode > <use-livecode@lists.runrev.com> wrote: > > 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 > > On 17/10/19, 11:24 am, "use-livecode on behalf of Bill Vlahos via > use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of > use-livecode@lists.runrev.com> wrote: > > I’m writing a countdown timer application and want to display the > remaining time not as the number of seconds but in the format of HR:MIN:SEC > left. > > For example 75 seconds would display as “0:1:15”. > 130 seconds would display as “0:2:10”. > > I know how to do the math to figure it out but I’m wondering if there is a > built in function to do this. > > Convert wants to deal with actual time so I would get something like > “0:1:15 PM”. > > Thanks, > Bill Vlahos > _______________________________________________ > 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 > > > > _______________________________________________ > 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 > _______________________________________________ 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