NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HxLink DID NOT INITIALIZE

Weekday Function

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

Weekday(date, [firstdayofweek])

Arguments

date
Required. DateTime.
firstdayofweek
Optional. A constant that specifies the first day of the week. If not specified, vbSunday is assumed.

Settings

The firstdayofweek argument has these settings:

Constant Value Description
UseSystemDayOfWeek 0 Use the day of the week specified in your system settings for the first day of the week
Sunday 1 Sunday (default)
Monday 2 Monday
Tuesday 3 Tuesday
Wednesday 4 Wednesday
Thursday 5 Thursday
Friday 6 Friday
Saturday 7 Saturday

Return Values

The Weekday function can return any of these values:

Constant Value Description
Sunday 1 Sunday
Monday 2 Monday
Tuesday 3 Tuesday
Wednesday 4 Wednesday
Thursday 5 Thursday
Friday 6 Friday
Saturday 7 Saturday

Remarks

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).

See Also

Example

Calendar Property | Date Function | Date Statement | Day Function | Month Function | Now Function | WeekdayName Function | Year Function