Autor Beitrag
WEBSTER
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 13.12.06 10:11 
Salute,

ich benötige das Datum von gestern. Z.Z ermittle ich mir das Datum so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
      Present := now;
      DecodeDate(Present, Year, Month, Day);
      DecodeTime(Present, Hour, Min, Sec, MSec);
      
      ShowMessage(IntToStr(Day-1));


Das klappt auch ganz gut, nur wenn es sich um den ersten eines Monats handelt, dann ist Day = 0 (1-1=0) und nicht der letze des Vormonats. Ist ja auch logisch.

Die Function Yesterday gibt es ja erst ab D6.

Wer kann mir helfen.....?


THX
WEBSTER

Moderiert von user profile iconmatze: Code- durch Delphi-Tags ersetzt

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 13.12.06 10:14 
Moin!

Ist nicht:
ausblenden Delphi-Quelltext
1:
yesterday := Now -1;					

;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
WEBSTER Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 13.12.06 10:23 
Salute,

danke für den Tip.....hätte ich ja selber drauf kommen müssen.....


THX a lot
WEBSTER

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.