请教Delphi如何求60天前的日期啊不会用日期函数。
请问Delphi怎么求60天前的日期啊?不会用日期函数。。。
dDate是当前日期,怎么样可以算60天前的日期?
谢谢!
------解决方案--------------------
implementation
uses DateUtils;//引用它
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
DT : TDate;
begin
DT := IncDay(Now, -60);//这就是
ShowMessage(DateToStr(DT));
end;
dDate是当前日期,怎么样可以算60天前的日期?
谢谢!
------解决方案--------------------
implementation
uses DateUtils;//引用它
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
DT : TDate;
begin
DT := IncDay(Now, -60);//这就是
ShowMessage(DateToStr(DT));
end;