Function to add or subtract the number of minutes to the specified date.
function IncMinute(dt: double; iMinutes: int64): double;
Parameter |
Type |
Value |
---|---|---|
dt |
double |
date/time value to which you need to add or subtract minutes; |
iMinutes |
int64 |
number of minutes that you need to add or subtract. If the number is positive — add minutes, if negative — subtract. |
.
Returns a date/time value shifted by a specified number of minutes.
var
dt: double;
begin
dt := Now;
mLogScript(FormatDateTime('hh:nn', dt), 'now');
dt := IncMinute(dt, 90);
mLogScript(FormatDateTime('hh:nn', dt), '+1 hour and 30 minutes');
end.
[15:46:30] (Log "IncMinute"): [now] 15:46
[15:46:30] (Log "IncMinute"): [+1 hour and 30 minutes] 17:16