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

# IncYear

Returns the given date incremented by the number of years given as the **ANumberOfYears** parameter.

**Declaration**: Function IncYear(const AValue: TDateTime; const ANumberOfYears: Integer): TDateTime;

This is a simple example.

```pascal
procedure OnMapEvent(var Value:Variant);
begin
 //Returns a date incremented by 7 years
  Value := IncYear(Date,7);
end;
```
