Delphi Examples: DbiTimeEncode

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiTimeEncode

Return to chapter overview

Encode Hour, Minute, and Seconds into a TIME variable.

This example uses the following input:

 fDbiTimeEncode(4,20,42, MyTime);

 

The procedure is:

procedure fDbiTimeEncode(iHour: Word; iMin: Word; iSec: Word; var TimeT: Time);

begin

if (iSec > 59) then

   Check(dbiErr_InvalidTime);

 iSec := iSec * 1000;

 Check(DbiTimeEncode(iHour, iMin, iSec, TimeT));

end;