FormatDateTime has an overloaded version that can be used to override format settings:
function FormatDateTime(const Format: string; DateTime: TDateTime; const FormatSettings: TFormatSettings): string; overload;
Where TFormatSettings is defined as:
type TFormatSettings = record CurrencyFormat: Byte; NegCurrFormat: Byte; ThousandSeparator: Char; DecimalSeparator: Char; CurrencyDecimals: Byte; DateSeparator: Char; TimeSeparator: Char; ListSeparator: Char; CurrencyString: string; ShortDateFormat: string; LongDateFormat: string; TimeAMString: string; TimePMString: string; ShortTimeFormat: string; LongTimeFormat: string; ShortMonthNames: array[1..12] of string; LongMonthNames: array[1..12] of string; ShortDayNames: array[1..7] of string; LongDayNames: array[1..7] of string; TwoDigitYearCenturyWindow: Word; end;
TFormatSettings can be used by almost all format functions.
You can get the format settings for this language using (on Windows). Or you can create it yourself.
procedure GetLocaleFormatSettings(LCID: Integer; var FormatSettings: TFormatSettings);
Everything in SysUtils.
And you can find the LCID on this site .
source share