DayOfWeek: Integer;
The DayOfWeek property returns the day of the week from the current variable.
Available values:
1 - Monday.
2 - Tuesday.
3 - Wednesday.
4 - Thursday.
5 - Friday.
6 - Saturday.
0 - Sunday.
Sub UserProc;
Var
DT: DateTime;
i, i1: Integer;
Begin
DT := DateTime.Now;
i := DT.DayOfWeek;
DT := DateTime.AddMonths(DT, 1);
i1 := DT.DayOfWeek;
End Sub UserProc;
After executing the example the "i" variable contains the number of the day of the current week, and the "i1" variable contains the number of the day of the week corresponding to the current day in a month.
See also: