DateTime.AddDays

Syntax

AddDays(Value: DateTime; Count: Integer): DateTime;

Parameters

Value. Initial date

Count. The number of added days.

Description

The AddDays method adds the specified number of days to the initial date.

Example

Sub UserProc;
Var
    DT, DT1, DT2, DT3: DateTime;
Begin
    DT := DateTime.Parse("01.01.2002 00:00:00");
    DT1 := DateTime.AddDays(DT, 1);
    DT2 := DateTime.AddDays(DT, 48);
    DT3 := DateTime.AddDays(DT, 368);
End Sub UserProc;

After executing the example the "DT", "DT1", "DT2" and "DT3" variables contain the following values:

"DT" - "01.01.2002"

"DT1" - "02.01.2002"

"DT2" - "18.02.2002"

"DT3" - "04.01.2003"

See also:

DateTime