---
url: >-
  /statelake/scripting-reference/functions-and-procedures/datetime-functions/incminute.md
---

# IncMinute

**IncMinute** returns the given date, incremented by the number of minutes given as the **ANumberOfMinutes** parameter.

**ANumberOfMinutes** can be negative, to return a date, earlier by the specified number of minutes.

The time of day specified by **AValue** is copied to the result.

**Declaration**: Function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64): TDateTime;

This is a simple example.

```pascal
procedure OnMapEvent(var Value:Variant);
var
  TheDate, ThatDate, BackDate : TDateTime;
begin
 //Returns a date incremented by 10 minutes
  TheDate := Now;
  ThatDate := IncMinute(TheDate, 10);
  BackDate := IncMinute(TheDate,-10);
  LogInfo(FormatDateTime('yyyy-mm-dd hh:nn:ss.zzz', TheDate));
  LogInfo(FormatDateTime('yyyy-mm-dd hh:nn:ss.zzz', ThatDate));
  LogInfo(FormatDateTime('yyyy-mm-dd hh:nn:ss.zzz', BackDate));
end;
```
