[Overview][Constants][Procedures and functions][Index] Reference for unit 'dateutils' (#rtl)

IncDay

Increase a DateTime 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;

Arguments

AValue

  

DateTime value to which days should be added.

ANumberOfDays

  

Number of days to add.

Function result

DateTime representing AValue plus ANumberOfDays days.

Arguments

AValue

  

DateTime value to which days should be added.

Description

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

See also

IncYear

  

Increase a DateTime value with a number of years.

#rtl.sysutils.IncMonth

  

Increases the month in a TDateTime value with a given amount.

IncWeek

  

Increase a DateTime value with a number of weeks.

IncHour

  

Increase a DateTime value with a number of hours.

IncMinute

  

Increase a DateTime value with a number of minutes.

IncSecond

  

Increase a DateTime value with a number of seconds.

IncMilliSecond

  

Increase a DateTime value with a number of milliseconds.

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.

Documentation generated on: Nov 16 2015