IncDay

Increase a TDateTime value with a number of days.

Declaration

Source position: dateutil.inc line 289

  function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer)
                  : TDateTime;
  function IncDay(const AValue: TDateTime) : TDateTime;

Description

IncDay adds ANumberOfDays days to AValue and returns the resulting date/time.ANumberOfDays can be positive or negative.

See also

Name Description
IncHour Increase a TDateTime value with a number of hours.
IncMilliSecond Increase a TDateTime value with a number of milliseconds.
IncMinute Increase a TDateTime value with a number of minutes.
IncSecond Increase a TDateTime value with a number of seconds.
IncWeek Increase a TDateTime value with a number of weeks.
IncYear Increase a TDateTime value with a number of years.
#rtl.sysutils.IncMonth Increases the month in a TDateTime value with a given amount.

Example

Program Example74;
{ This program demonstrates the IncDay function }
Uses SysUtils,DateUtils;
Begin
  Writeln('One Day from today is ',DateToStr(IncDay(Today,1)));
  Writeln('One Day ago from today is ',DateToStr(IncDay(Today,-1)));
End.