DayOfYear: Integer;
The DayOfYear property returns the day number of the current variable starting from the beginning of the year.
Sub UserProc;
Var
DT: DateTime;
i: Integer;
Begin
DT := DateTime.Now;
i := DT.DayOfYear;
End Sub UserProc;
After executing the example the "i" variable contains the number of day in the current year.
See also: