或加一天, 有没有现成的函数。 谢谢

解决方案 »

  1.   

    月份加1 :IncMonth(Date, 1)
    下月1 号:
    var y,m,d:word;
        datenext:datetime
      DecodeDate(IncMonth(Date, 1), Y, M, D);
      Datenext := EncodeDate(Y, M, 1);
      

  2.   

    d:datetime;//双精度浮点数
    newd:=d+1;
    加了一天
      

  3.   

    Returns a date shifted by a specified number of days.UnitDateUtilsCategorydatetime routinesDelphi syntax:function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer = 1): TDateTime;C++ syntax:extern PACKAGE System::TDateTime __fastcall IncDay(const System::TDateTime AValue, const int ANumberOfDays = 0x1);DescriptionIncDay returns the value of the AValue parameter, incremented by ANumberOfDays days. ANumberOfDays can be negative, to return a date N days previous.The time of day specified by the AValue parameter is copied to the result.Returns a date shifted by a specified number of months.UnitSysUtilsCategorydatetime routinesDelphi syntax:function IncMonth(const Date: TDateTime; NumberOfMonths: Integer = 1): TDateTime;C++ syntax:extern PACKAGE System::TDateTime __fastcall IncMonth(const System::TDateTime Date, int NumberOfMonths = 1);DescriptionIncMonth returns the value of the Date parameter, incremented by NumberOfMonths months.  NumberOfMonths can be negative, to return a date N months previous.If the input day of month is greater than the last day of the resulting month, the day is set to the last day of the resulting month.  The time of day specified by the Date parameter is copied to the result.