![]() |
If Abfrage oder Algorithmus?
kann man für die zeit, wie für das datum, auch die: if Datum <=> now then Abfrage benutzen, oder muss man hierfür einen Algorithmus schreiben?
|
Re: If Abfrage oder Algorithmus?
Geht auch mit if!
|
Re: If Abfrage oder Algorithmus?
He Matz! Das wäre dann so oder?: b := '05.10.2003';
if StrToDate(b) >= now then |
Re: If Abfrage oder Algorithmus?
Achtung! Jetzt verwechselst du aber das Datum mit der Zeit!
|
Re: If Abfrage oder Algorithmus?
Sorry. Falsches kopiert :D
|
Re: If Abfrage oder Algorithmus?
Geht es jetzt um die Zeit oder das Datum?
PS: Ich heiße Matze, nicht Matz!! :warn: |
Re: If Abfrage oder Algorithmus?
Delphi-Quellcode:
Ich hoffe, das meinst du, es geht natürlich auch mit "now"!
procedure TForm1.Button1Click(Sender: TObject);
var Time: TTime; begin Time:=StrToTime(Label1.Caption); if TimeToStr(Time) = '15:00:00' then ShowMessage('Hallo'); end; |
Re: If Abfrage oder Algorithmus?
Es geht um die Zeit.
P.s: Sorry Matze :oops: |
Re: If Abfrage oder Algorithmus?
Mein Beispiel handelt von der Zeit. :warn:
|
Re: If Abfrage oder Algorithmus?
Das ist klar.Danke für deinen Rat :hello:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:35 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz