The WeekDay function returns the day of the week of the specified date as a long.
|
Syntax | ||||
|
WeekDay(Date [, FirstDayOfWeek]) | ||||
|
Return value | ||||
|
Type |
Description | |||
|
Long |
Weekday | |||
|
Parameter | ||||
|
Use |
Name |
Type |
Passing |
Description |
|
Required |
Date |
Double |
ByVal |
The date to be evaluated |
|
Optional |
FirstDayOfWeek |
Variant |
ByVal |
Determines the first day of the week. |
You can use the optional FirstDayOfWeek parameter to define the first day of the week.
|
FirstDayOfWeek |
Description |
|
1 |
Sunday (= Default value) |
|
2 |
Monday |
|
3 |
Tuesday |
|
4 |
Wednesday |
|
5 |
Thursday |
|
6 |
Friday |
|
7 |
Saturday |
You can look up the calculated day of the week in the following table:
|
WeekDay |
Description |
|
1 |
Sunday |
|
2 |
Monday |
|
3 |
Tuesday |
|
4 |
Wednesday |
|
5 |
Thursday |
|
6 |
Friday |
|
7 |
Saturday |