Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>tstring() numeric seconds to time string examplep.prg</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Tstring()      Numeric seconds to time string          Examplep.prg


Syntax:        Tstring(<expN>)

Argument:      <expN> is the seconds to convert.  The maximum number
               of seconds is 86,400 (the number of seconds in one day).

Returns:       A character string.

               Tstring() returns a 24-hour time string in the form:
               HH:MM:SS.

Notes:         . Time quantities over 24 hours are returned by Days().
               . The inverse of Tstring() is Secs().

Calls:         StrZero()
               Mod()

Library:       EXTEND.LIB


--------------------------------- Source Code ------------------------------

   FUNCTION Tstring

   PARAMETERS cl_secs

   RETURN StrZero(INT(Mod(cl_secs/3600, 24)), 2, 0) + ":" +;
          StrZero(INT(Mod(cl_secs/  60, 60)), 2, 0) + ":" +;
          StrZero(INT(Mod(cl_secs     , 60)), 2, 0)


See Also: Mod() Secs() StrZero()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson