>   ShortDateFormat := 'dd/mm/yyyy';  <-- New
>   Application.Initialize; // <-- Existing
>   Application.UpdateFormatSettings := False; < -- New
>   file://Stop windows resetting the short date format.
> Then everything is 4 digit year for your app only

Alter the code to accept the users format but stipulate 4 digit year
 
  s := lowercase(ShortDateFormat);
  if pos('yyyy',S)=0 then begin
    x := pos('yy',S);
    if x>0 then Insert('yy',S,x);
  end;
  ShortDateFormat := S;

This code (untested) should change the year value to 'yyyy' without
changing the users preferred date order.

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to