Year: Integer;
The Year property returns the number of the year from the current variable.
Sub Main;
Var
i: Integer;
DT: DateTime;
Begin
DT := DateTime.Parse("30.03.2004 00:00:00");
DT := DateTime.AddYears(DT, -4);
i := DT.Year;
End Sub Main;
After executing the example the "i" variable will contain the value 2000.
See also: