Z zqw0117 Unregistered / Unconfirmed GUEST, unregistred user! 2007-10-10 #2 Uses DateUtils; var D: TDateTime; begin D := Now; D := IncMonth(D, -30); ShowMessage(DateTimeToStr(D)); end;
Uses DateUtils; var D: TDateTime; begin D := Now; D := IncMonth(D, -30); ShowMessage(DateTimeToStr(D)); end;
D Dstorm Unregistered / Unconfirmed GUEST, unregistred user! 2007-10-10 #3 我的思路: var d : TDate; c : integer;//前n个月的天数,很好算的 begin d := date -c ;//n个月前年月 ShowMessage(DateToStr(d)); end;
我的思路: var d : TDate; c : integer;//前n个月的天数,很好算的 begin d := date -c ;//n个月前年月 ShowMessage(DateToStr(d)); end;
4 41426277 Unregistered / Unconfirmed GUEST, unregistred user! 2007-10-10 #4 用IncMonth函数 A=NOW; IncMonth(A,-30);就是前30个月的日期