6.1.2.4.1.13 Weekday

Function Declaration

 Function Weekday(Date, 
                  Optional FirstDayOfWeek 
                        As VbDayOfWeek = vbSunday                  ) As Variant 

Parameter

Description

Date

Any data value (section 2.1). The data value SHOULD be Let-coercible to Date. If Date contains Null, Null is returned.

FirstDayOfWeek

A constant that specifies the first day of the week. If not specified, Sunday is assumed. See section 6.1.1.7.

 

Runtime Semantics.

§ Returns an Integer containing a whole number representing the day of the week.

§ The Weekday function can return any of these values (see section 6.1.1.7):

Constant

Value

Description

vbSunday

1

Sunday

vbMonday

2

Monday

vbTuesday

3

Tuesday

vbWednesday

4

Wednesday

vbThursday

5

Thursday

vbFriday

6

Friday

vbSaturday

7

Saturday

 

§ If the Calendar property setting is Gregorian, the returned Integer represents the Gregorian day of the week for the Date argument. If the calendar is Hijri, the returned Integer represents the Hijri day of the week for the Date argument. For Hijri dates, the argument number is any numeric expression that can represent a date and/or time from 1/1/100 (Gregorian Aug 2, 718) through 4/3/9666 (Gregorian Dec 31, 9999).