Autor Beitrag
Jens Hartmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120

XP
Delphi
BeitragVerfasst: Di 28.11.06 21:58 
Hallo Leute,

Habe ein kleines Problem.
Ich bin ein Programm am schreiben um eine Wochenplanung (Terminplaner) zu realisieren.
Ich möchet nun bei dem Ereignis Form.Create einen DateTimePicker auf das Datum des letzten Montags setzen.
Das heißt: Ich Starte das Programm heute 28.11.2006 (Dienstag) somit muss der DateTimePicker den Wert 27.11.2006 annehmen.
Also jeweils von der aktuellen Woche den Montag.

Wie kann ich das realisieren.

MFG

Jens

_________________
Das Leben ist zu kurz um nicht jeden Tag zu genießen.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Di 28.11.06 22:40 
Hallo,

ausblenden Delphi-Quelltext
1:
DateTimePicker1.Date := now-DayOfWeek(now)+2;					
oder war +1 richtig :gruebel:

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )