直接在tdatetime上加n就可以了
举个例:
假如: date()='2002-08-13';
==> date()+1='2002-08-14';
当然了,你自己还要用formatDateTime来格式化一下
举个例:
假如: date()='2002-08-13';
==> date()+1='2002-08-14';
当然了,你自己还要用formatDateTime来格式化一下
'2002/01/01' +200
得到的日期是多少?
你date()取得是当前日期,
我不是从当前日期开始的
Date1,Date2:TDate;
begin
Date1:=StrToDate('2002-1-1');
Date2:=Date1+200;
Edit1.text:=DateToStr(Date2);
end;自己看结果 2002-7-20
var
t:tdate;
begin
t:=strtodate('2002-01-01') +200 ;
showmessage(datetostr(t));
end;
IncMonth,是月数增减