DateTime.Year

Syntax

Year: Integer;

Description

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

Example

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:

DateTime