比如:2005-02-16  到  2005-03-25如何在循环条件中按一天一天执行呢?谢谢

解决方案 »

  1.   

    +1就行了,IncDay也可以:
    Returns a date shifted by a specified number of days.UnitDateUtilsCategorydatetime routinesDelphi syntax:function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer = 1): TDateTime;
      

  2.   

    dateUtls里面有startofamonth endofamonth incday这样的函数,不用多说了吧!
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
        i,dtBegin,dtEnd:integer;
    begin
        dtBegin:=Trunc(StrToDate('2005-03-01'));
        dtEnd:=Trunc(StrToDate('2003-03-31'));
        for i:=dtBegin to dtEnd do
            Memo1.Lines.Add(IntToStr(i));
    end;