Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi TryStrToDate funktioniert unter Delphi 11 nicht mehr (richtig) (https://www.delphipraxis.net/210022-trystrtodate-funktioniert-unter-delphi-11-nicht-mehr-richtig.html)

OlliWW 17. Feb 2022 21:48

Delphi-Version: 11 Alexandria

TryStrToDate funktioniert unter Delphi 11 nicht mehr (richtig)
 
Hallo,

Vielleicht kann mir jemand einen Tipp geben.

Bei der Migration von Delphi 10.4. auf Delphi 11 bin ich auf einen Bug (?) gestoßen, der zunächst unwichtig erscheint, aber in meiner Software große Auswirkungen hat.

Delphi-Quellcode:
var
  dDate: TDateTime;
begin
  TryStrToDate('10.11', dDate);
end;
Unter Delphi 10.4. (und kleiner) liefert mir dies: 10.11.2022 als Datum zurück (laut Beschreibung / Hilfe von Delphi 11 sollte das auch weiterhin so sein). Unter Delphi 11 gibt die Funktion allerdings False zurück und convertiert mir meinen String nicht mehr.

Ist das ein Bug, oder gibt es unter Delphi 11 etwas, das ich beachten muss? Ich hab im Changelog schon nachgesehen aber nichts außer:
Zitat:

Dates to strings and reverse conversions have been improved. Worth to note, that now StrToDate strictly follows ‘to date’ format string, supports date formats with month and day names, and supports date formats with arbitrary text inside. Also improves TFormatSettings date/time related properties initialization and unifies the representation on all platforms.
gefunden.

himitsu 17. Feb 2022 22:10

AW: TryStrToDate funktioniert unter Delphi 11 nicht mehr (richtig)
 
Das ist aber auch nichtmal ansatzweise ein gültiger Datumstext.

Da kann es schon sein, dass es nicht mehr funktioniert, nachdem die alles umgeaut haben.

Uwe Raabe 17. Feb 2022 22:13

AW: TryStrToDate funktioniert unter Delphi 11 nicht mehr (richtig)
 
Bekannter Bug: https://quality.embarcadero.com/browse/RSP-36115

Aber immerhin:
Zitat:

Dmitry Arefiev added a comment - 1 week ago
This bug was fixed and the change will be included into 11 Update 1, which will be released in "close future". Sorry, I cannot be more precise.

OlliWW 17. Feb 2022 22:15

AW: TryStrToDate funktioniert unter Delphi 11 nicht mehr (richtig)
 
Zitat:

Zitat von Uwe Raabe (Beitrag 1502426)
Bekannter Bug: https://quality.embarcadero.com/browse/RSP-36115

Aber immerhin:
Zitat:

Dmitry Arefiev added a comment - 1 week ago
This bug was fixed and the change will be included into 11 Update 1, which will be released in "close future". Sorry, I cannot be more precise.

Ah Danke Uwe, ich hatte nach "TryStrToDate" im QC gesucht, aber nicht nach ScanDate. Dann warten wir mal auf die "Close Future".


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:50 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-2025 by Thomas Breitkreuz