unit demo1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
edit1.Text:=datetostr(date);
edit2.Text:='22.09.2005';
if strtodate(edit1.Text)>strtodate(edit2.Text)then begin
showmessage('hata');
halt;
end
else if strtodate(edit1.Text)=strtodate(edit2.Text)then begin
showmessage('bugün son gün');
end
else if strtodate(edit1.Text)<strtodate(edit2.Text)then begin
form1.Show;
end;
end;
end.