Delphi Examples: DbiSetDateFormat

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiSetDateFormat

Return to chapter overview

Set the date format for the current session.

This example uses the following input:

 fDbiSetDateFormat;

 

The procedure is:

procedure fDbiSetDateFormat;

var

 fDate : FMTDate;

begin

 // Specifies date separator character

 fDate.szDateSeparator := '/'; { }

 // Date format. 0 = MDY, 1 = DMY, 2 = YMD

 fDate.iDateMode := 0;

 // If TRUE, write year as four digits

 fDate.bFourDigitYear := False;

 // On input add 1900 to year if True

 fDate.bYearBiased := False;

 // Month displayed with a leading zero if True

 fDate.bMonthLeadingZero := False;

 //. Day displayed with leading zero if True

 fDate.bDayLeadingZero := False;

 Check(DbiSetDateFormat(fDate));

end;