Thema: Delphi StrToDate

Einzelnen Beitrag anzeigen

API

Registriert seit: 18. Apr 2004
636 Beiträge
 
#1

StrToDate

  Alt 2. Jun 2008, 13:04
Hallo,

Warum funktioniert diese Zeit Umwandlung nicht? Habe ich etwas übersehen?
(D6: function StrToDate(const S: string): TDateTime

Delphi-Quellcode:
var
  DateStr :string;
begin
  ShortMonthNames[5] := 'Mai';
  DateStr := '23-Mai-2008';
  DateSeparator := '-';
  LongDateFormat := 'dd-mmm-yyyy';
  DateTimePicker1.DateTime := StrToDate(DateStr);
end;

Zitat:
---------------------------
Project1
---------------------------
'23-Mai-2008' is not a valid date and time.
---------------------------
OK
---------------------------
  Mit Zitat antworten Zitat