AddMinutes(Value: DateTime; Count: Integer): DateTime;
Value - initial date.
Count - the number of added minutes.
The AddMinutes method adds the specified number of minutes to the initial date passed as the Value parameter.
Sub Main;
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 Main;
After executing the example the "DT", "DT1", "DT2" and "DT3" and "DT4" variables will 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: