bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MS Access Weekday() Function

Concept visual

MS Access Weekday() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the weekday number for a date:

SELECT Weekday(#05/17/2017#);

Definition and Usage

The Weekday() function returns the weekday number for a given date. This function returns an integer between 1 and 7.

Syntax

Weekday(

date, firstdayofweek )

Parameter Values

Parameter

Description date

Required. A valid date firstdayofweek Optional. Specifies the first day of the week. Can be one of the following values:

Formula

0 = Use the NLS API setting
1 = Sunday (default)
2 = Monday
3 = Tuesday
4 = Wednesday
5 = Thursday
6 = Friday
7 = Saturday

Technical Details

Works in:

From Access 2000

More Examples

Example

Return the weekday number for the current date:

SELECT Weekday(Date());

Example

Return the weekday number for the specified date, setting Monday as the first day of week:

SELECT Weekday(#05/17/2017#, 2);

Previous

❮ MS Access Functions

Next

Previous

MS Access TimeValue() Function

Next

MS Access WeekdayName() Function