![]() |
StrToDate
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:
|
Re: StrToDate
![]() |
Re: StrToDate
Zitat:
|
Re: StrToDate
Zitat:
|
Re: StrToDate
Ich würd mal sagen, nach dem Monatsnamen darf kein Separator kommen, aber :?:
Wieso soll er englisch brauchen? |
Re: StrToDate
Zitat:
Zitat:
|
Re: StrToDate
Versuch es mal mit der überladenen Variante der Funktion
|
Re: StrToDate
Zitat:
|
Re: StrToDate
OH: "Die Reihenfolge von Tag, Monat und Jahr wird von der globalen Variable ShortDateFormat ... bestimmt"
... und nicht LongDateFormat |
Re: StrToDate
Zitat:
Delphi-Quellcode:
oder
ShortDateFormat := 'dd-mmm-yyyy';
Delphi-Quellcode:
ShortDateFormat := 'd/m/y';
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:59 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz