Player Duration to hh:mm:ss

Bill Marriott wjm at
Mon Dec 19 18:14:36 EST 2005

Actually, if you note my examples, the omission of the third trunc was 
intentional to allow for fractional seconds. You can always pass a trunc'ed 
or rounded value if you like. :)


Garrett Hylltun wrote:
> Your player time convert works great except it was missing one thing,  so 
> here's a fixed version in case anyone else was going to use the  same bit 
> of code (there's a note between ---> and <--- that describes  the changed 
> code):

>     put the trunc of (mySecondsTime - 3600 * myHours - 60 *  myMinutes) 
> into mySeconds
>     -- ---> the above needed a "trunc" issued like further above  <-------

I wrote earlier:
> Example:
> ConvertSeconds(60) returns "00:01:00"
> ConvertSeconds(121.5) returns "00:02:01.5" 

More information about the Use-livecode mailing list