Delphi Examples: DbiDateEncode

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiDateEncode

Return to chapter overview

Encode month, day, and year numbers into a DBIDATE structure.

Keep in mind that you need to use this function only when you are directly accessing BDE format dates. Otherwise, VCL handles this conversion for you.

This example uses the following input:

 fDbiDateEncode(2, 8, 71, MyDate);

 

The function is defined as:

function fDbiDateEncode(Month : Word, Day : Word, Year : SmallInt, MyDate : DbiDate) : DbiDate;

begin

 Check(DbiDateEncode(Month, Day, Year, MyDate));

 Result := Mydate;

end;