DateTime.DayOfWeek

Syntax

DayOfWeek: Integer;

Description

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.

Example

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:

DateTime