Autor Beitrag
tom1266
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 21.11.02 14:47 
Hallo Leute, ich habe folgendes Problem, wie kann ich zum Bsp das Datum
21.11 (ohne Jahresangabe) mit dem heutigen Datum vergleichen?

Für Hilfe wäre ich euch dankbar!!

Gruß Tom
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: Do 21.11.02 15:12 
Hallo,

der Befehl DecodeDate kann einen Date Time Wert in die Bestandteile Tag, Monat, Jahr zerlegen, diese kannst du dann getrennt auswerten.
Eine andere Möglichkeit bietet dir FormatDateTime hiermit kannst du DateTime-Werte in einen String umwandeln. Um z.B. das Aktuelle Datum in das von dir gewünschte Format zu wandeln sähe der Befehl so aus:
formatDateTime('dd.mm', Date);
wenn du das jetzt mit der eingabe vergleichst hast du deine Lösung.

Gruß
Klabautermann
tom1266 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 21.11.02 15:18 
danke für den tip, soweit hatte ich schon probiert, habe jetzt aber das problem, wie muß ich mein gegebens Datum zB. 21.11 deklarieren damit ich das heutige formatierte datum mit dem gegebenen vergleichen kann?

Gruß tom1166
tom1266 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 21.11.02 15:51 
Alles klar hat sich erledigt, der knoten ist geplatz, danke für die hilfe!!

Gruß Tom