MS2TimeStr Function
Converts a time in MilliSeconds to a string of the form 'H:MM:SS.mmm'.

Unit
QESBPCSDateTime

Declaration
Function MS2TimeStr(const MS: Int64): string;

Parameters
MS Value in Milliseconds.

Category
Date/Time Arithmetic Routines

Implementation

function MS2TimeStr (const MS: Int64): string;
var
     L: Int64;
     Hold: Boolean;
begin
     Hold := ESBBlankWhenZero;
     ESBBlankWhenZero := False;
     try
          L := MS;
          Result := '.' + Int2ZStr (L mod 1000, 3);
          L := L div 1000;
          Result := ':' + Int2ZStr (L mod 60, 2) + Result;
          L := L div 60;
          Result := ':' + Int2ZStr (L mod 60, 2) + Result;
          L := L div 60;
          Result := Int2EStr (L) + Result;
     finally
          ESBBlankWhenZero := Hold;
     end;
End;


HTML generated by Time2HELP
http://www.time2help.com