Weekday
Purpose
This function converts an expression to a whole number that represents the day of the week.
Syntax
Weekday(date[,firstdayofweek])
Argument | Description |
---|---|
date | Any expression that can represent a date. If date contains Null, Null |
firstdayofweek | Constant that specifies the first day of the week. If omitted, vbSunday is used. |
Constant Value | Description |
---|---|
VbUseSystem or 0 | Use National Language Support (NLS) API setting |
vbSunday or 1 | Sunday (default) |
vbMonday or 2 | Monday |
vbTuesday or 3 | Tuesday |
vbWednesday or 4 | Wednesday |
vbThursday or 5 | Thursday |
vbFriday or 6 | Friday |
vbSaturday or 7 | Saturday |
Examples
Function | Result |
---|---|
Weekday("01 January 2012") | 1 |
Weekday("01-01-2012",2) | 7 |
Where WeekdayName can be 1...7.