Forum: Object-Pascal / Delphi-Language
Delphi
by API,
2. Jun 2008
@marabu. Danke! Das funktioniert endlich.
Verwende die Funktion nun so:
function StrToDateTime(s: string): TDateTime;
var
iMonth, nMonth: Integer;
sMonth: string;
begin
iMonth := Pos('mmm', ShortDateFormat);
Forum: Object-Pascal / Delphi-Language
Delphi
by API,
2. Jun 2008
Unter D6 gibt es, wie bereits geschrieben, leider keine überladene StrToDate() Funktion.
Forum: Object-Pascal / Delphi-Language
Delphi
by API,
2. Jun 2008
Das habe ich zuvor auch schon probiert geht aber auch nicht:
ShortDateFormat := 'dd-mmm-yyyy'; oder ShortDateFormat := 'd/m/y';
Forum: Object-Pascal / Delphi-Language
Delphi
by API,
2. Jun 2008
Unter D6 gibt's keine überladene Funktion.
Forum: Object-Pascal / Delphi-Language
Delphi
by API,
2. Jun 2008
Wo brauche ich Englisch? Es steht ja überall "Mai"
Das Datum DateStr ist vorgegeben. Aber auch wenn der Separator weggelassen wird, geht's nicht.
Forum: Object-Pascal / Delphi-Language
Delphi
by API,
2. Jun 2008
Hallo,
Warum funktioniert diese Zeit Umwandlung nicht? Habe ich etwas übersehen?
(D6: function StrToDate(const S: string): TDateTime;)
var
DateStr :string;
begin
ShortMonthNames := 'Mai';
DateStr := '23-Mai-2008';