Delphi Examples: DbiGetTimeFormat

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiGetTimeFormat

Return to chapter overview

Obtain information about the Time Format on your system.

This example uses the following input:

 Memo1.Lines.Add(fDbiGetTimeFormat);

 

The function is:

function fDbiGetTimeFormat: String;

var

  MyTimeFormat : FMTTime;

begin

 Check(DbiGetTimeFormat(MyTimeFormat));

 SetLength(Result, 100);

with MyTimeFormat do

   Result := Format('Separator: %s, AM: %s, PM: %s',

     [cTimeSeparator, szAmString, szPmString]);

 SetLength(Result, StrLen(PChar(Result)));  

end;