DateTime.AddMinutes

Syntax

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

Parameters

Value. Initial date.

Count. The number of added minutes.

Description

The AddMinutes method adds the specified number of minutes to the initial date.

Example

Sub UserProc;
Var
    DT, DT1, DT2, DT3, DT4: DateTime;
Begin
    DT := DateTime.Parse("01.01.2004 10:20:20");
    DT1 := DateTime.AddMinutes(DT, 10);
    DT2 := DateTime.AddMinutes(DT, -20);
    DT3 := DateTime.AddMinutes(DT, 190);
    DT4 := DateTime.AddMinutes(DT, -2300);
End Sub UserProc;

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

"DT" - "01.01.2004 10:20:20"

"DT1" - "01.01.2004 10:30:20"

"DT2" - "01.01.2004 10:00:20"

"DT3" - "01.01.2004 13:30:20"

"DT4" - "30.12.2003 20:00:20"

See also:

DateTime