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

# IncWeek

Increase a DateTime value with a number of weeks.

## Declaration

Source position: line 0

`function IncWeek(`
`const AValue: TDateTime;`
`const ANumberOfWeeks: Integer`
`):TDateTime; function IncWeek(`
`const AValue: TDateTime`
`):TDateTime;`

## Arguments

`AValue` |  | DateTime to which weeks should be added.
`ANumberOfWeeks` |  | Number of weeks to add

## Function result

DateTime representing AValue plus ANumberOfWeeks weeks.

## Arguments

`AValue` |  | DateTime to which weeks should be added.

## Description

IncWeek adds ANumberOfWeeks weeks to AValue and returns the resulting date/time.ANumberOfWeeks 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.
IncDay |  | Increase a DateTime value with a number of days.
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 Example73;

    { This program demonstrates the IncWeek function }

    Uses SysUtils,DateUtils;

    Begin
      Writeln('One Week from today is ',DateToStr(IncWeek(Today,1)));
      Writeln('One Week ago from today is ',DateToStr(IncWeek(Today,-1)));
    End.

Documentation generated on: Feb 26 2014