Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   TDateedit Datum einstellen (https://www.delphipraxis.net/155857-tdateedit-datum-einstellen.html)

khh 10. Nov 2010 14:51

TDateedit Datum einstellen
 
hallo zusammen,
gibts ne Möglichkeit beim TDateEdit das Startdatum auf den 1. des Monats zu stellen, oder muss ich das selbst zusammen bauen?

Danke Gruss KHH

DeddyH 10. Nov 2010 15:06

AW: TDateedit Datum einstellen
 
Schnell gebaut:
Delphi-Quellcode:
var y,m,d: word;
begin
  DecodeDate(date,y,m,d);
  d := 1;
  DateEdit1.Date := EncodeDate(y,m,d);

gmc616 10. Nov 2010 15:09

AW: TDateedit Datum einstellen
 
TDateEdit kenne ich zwar nicht, aber mit Sicherheit wird es dort die Eigenschaft DateTime geben.

Delphi-Quellcode:
uses
  DateUtils;

  DateEdit1.DateTime := StartOfTheMonth( now () );

khh 10. Nov 2010 15:20

AW: TDateedit Datum einstellen
 
funktioniert beides mit dateedit.date


.-)

danke euch


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:14 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