Autor Beitrag
Kri
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 118



BeitragVerfasst: Mi 16.01.08 01:31 
Hi Leute,

wie kann ich feststellen ob ein Datum sich (bei Date:=Now;) in der Vergangenheit oder in der Zukunft liegt?

EDIT: Außer yyyy, mm, dd, hh, ss einzeln abzugleichen.

Grüße
Kri
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 16.01.08 02:07 
Moin!

Ich würde sagen: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
if (TheDate < Now) then
  ShowMessage('Vergangenheit')
else if (TheDate > Now) then
  ShowMessage('Zukunft')
else
  ShowMessage('Jetzt');

cu
Narses

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



BeitragVerfasst: Mi 16.01.08 20:22 
Ok vielen Dank.

Grüße
Kri