Weekday

This function converts an expression to a whole number that represents the day of the week.

Syntax

Weekday(date, [firstdayofweek])

Parameters

date
Any expression that can represent a date. If date contains Null, Null is returned.
firstdayofweek
Constant that specifies the first day of the week. If omitted, vbSunday is used. The following table shows the settings for the firstdayofweek parameter.
Constant
Value
Description
vbUseSystem 0 Use National Language Support (NLS) API setting
vbSunday 1 Sunday
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday

Return Values

The following table shows the return values of the Weekday function.

Constant
Value
Description
vbSunday 1 Sunday
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday