DateFormat

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloEnv > TApolloEnv Properties >

DateFormat

Declaration

property DateFormat: TApolloDateFrmt;

Description

Contains a numeric value indicating the current DateFormat as set by SetDateFormat. This value can be any one of the following:

 

dfAmerican 0 'MM/DD/YY'

dfAnsi  1 'YY.MM.DD'

dfBritish 2 'DD/MM/YY'

dfFrench 3 'DD/MM/YY'

dfGerman 4 'DD.MM.YY'

dfItalian 5 'DD-MM-YY'

dfSpanish 6 'DD-MM-YY'

dfWinDefault 7 (Windows default setting)

 

If SetCentury is True, the century digits will precede the year digits in each of the formats shown above.

Delphi Example

procedure TForm1.Button1Click(Sender: TObject);

var

 iRetVal: Integer; 

begin

 iRetVal := Ord( ApolloEnv1.DateFormat );

 case iRetVal of 

         0: ShowMessage( 'AMERICAN date format' ); 

         1: ShowMessage( 'ANSI date format' ); 

         2: ShowMessage( 'BRITISH date format' ); 

         3: ShowMessage( 'FRENCH date format' ); 

         4: ShowMessage( 'GERMAN date format' ); 

         5: ShowMessage( 'ITALIAN date format' ); 

         6: ShowMessage( 'SPANISH date format' ); 

         7: ShowMessage( 'Windows default date format' ); 

 end; 

end;

See Also

SetDateFormat, Century, SetCentury