DateTime.Year

Syntax

Year: Integer;

Description

The Year property returns the number of the year from the current variable.

Example

Sub UserProc;
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 UserProc;

After executing the example the "i" variable contains the 2000 value.

See also:

DateTime