Microsoft® Visual Basic® Scripting Edition
Weekday Function
| Language Reference 
| Home | Site Map |

 

See Also


Description
Returns a whole number representing the day of the week.

Syntax

Weekday(date, [firstdayofweek])

The Weekday function syntax has these arguments:

PartDescription
dateAny expression that can represent a date. If date contains Null, Null is returned.
firstdayofweekA value that specifies the first day of the week, as described in Settings. If omitted, 1 is assumed.

Settings

The firstdayofweek argument has these settings:

Value Description
0 Use NLS API setting.
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday
7 Saturday

Return Values

The Weekday function can return any of these values:

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


© 1996 by Microsoft Corporation.