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