Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Datum in Edit-Feld (https://www.delphipraxis.net/23996-datum-edit-feld.html)

MCXSC 13. Jun 2004 18:53


Datum in Edit-Feld
 
Hallo!

Ich habe schon alles versucht, das aktuelle Datum (dd.mm.yyyy) in ein Edit-Feld zu bekommen. Aber trotz Delphi-Hilfe klappt dies irgendwie nicht... Kann mir jemand helfen? Ich weiß, nur, dass ich dafür ein Timer benötige...

Matze 13. Jun 2004 18:54

Re: Datum in Edit-Feld
 
Delphi-Quellcode:
Edit1.Text := DateToStr(Now);

MCXSC 13. Jun 2004 19:06

Re: Datum in Edit-Feld
 
Cool, THX!

Die Muhkuh 13. Jun 2004 19:21

Re: Datum in Edit-Feld
 
Oder

Delphi-Quellcode:
Edit1.Text := FormatDateTime('mm/dd/yyyy', now);
Weitere Format gibts in der OH einfach gucken

Sharky 14. Jun 2004 07:25

Re: Datum in Edit-Feld
 
Zitat:

Zitat von MCXSC
Hallo!

Ich habe schon alles versucht, das aktuelle Datum (dd.mm.yyyy) in ein Edit-Feld zu bekommen...

Aber Achtung!
Mit dem Code von Matze ist nicht garantiert das Du das Datum in dem Format bekommst wie Du es möchtest.
Viele (aber noch zu wenige) haben ihre Datumsanzeige im Rechner auf das offizielle Format (yyyy-mm-dd) umgestellt.


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:46 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz