Autor Beitrag
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Mi 28.05.03 10:51 
Hallo Leute !

Wie bestimme ich,das die Funktion FormatDateTime ein Datum ausgibt,das ich auch möchte z.b. möchte ich das Datum "02.03.04" und nicht "02.03.2004"
Geht das vllt so :
ausblenden Delphi-Quelltext
1:
2:
3:
Time.wYear   := FormatDateTime(yy);
Time.wMonth  := FormatDateTime(mmmm);
Time.wDay    := FormatDateTime(dddd);

???

Jagg !
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mi 28.05.03 11:00 
Hi,

das geht so:
ausblenden Delphi-Quelltext
1:
Label1.Caption := FormatDateTime('dd.mm.yy', date);					

Aber wenigstens die Anzahl der benötigten Parameter hättest du auch in der Delphi Hilfe nachschauen können (das geht schneller als auf Antwort zu warten ;)).

Gruß
Klabautermann
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Mi 28.05.03 11:34 
danke,aber was ist mit fehlermeldungen !
bei der eingabe "13.13.13" sagt er das es eine gültiges datum ist !
ich benutze maskedit,muss er das nicht dann schon automatisch bemerken ?


Jagg !
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mi 28.05.03 12:21 
13.13.13 könnte auch Deine Rentenvers.Nr. sein. Weißt Du nicht, daß Computer nur 1 und 1 zusammenzählen können? :lol:

_________________
Gruß
Hansa
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mi 28.05.03 12:50 
Hallo,
Jagg hat folgendes geschrieben:
danke,aber was ist mit fehlermeldungen !
bei der eingabe "13.13.13" sagt er das es eine gültiges datum ist !

Ach du willst ein Datum einlesen. Da brauchst du FormatDatetime überhaupt nicht. Da würdest du DecodeDate benötigen. Zur eingabe würde ich aber lieber einen tDateTimePicker verwenden. Der macht solche überprüfungen für dich.

Gruß
Klabautermann
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Mi 28.05.03 13:17 
ok,ich versuche es,wenn nicht melde ich mich nochmal