MS Access Weekday() Function
Example
Return the day of the week (as a number) for the specified date:
SELECT Weekday(#05/17/2017#);
Try it Yourself »
Definition and Usage
The Weekday() function returns a number (from 1 to 7) representing the day of the week for a date.
Syntax
Weekday(date, firstdayofweek)
Parameter Values
Parameter | Description |
---|---|
date | Required. A valid date |
firstdayofweek | Optional. Specifies the first day of the week. If omitted, Sunday is the
first day of the week.
Can be one of the following values:
|
Technical Details
Works in: | Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000 |
---|
More Examples
Example
Return the day of the week (as a number) for the current date:
SELECT Weekday(Date());
Try it Yourself »
Example
Return the day of the week (as a number) for the specified date, setting Monday as the first day of week:
SELECT Weekday(#05/17/2017#, 2);
Try it Yourself »