In Access, the WeekdayName function returns the name of the day of the week corresponding to the date and the first day of the week provided as arguments.
The syntax for the WeekdayName function is:
WeekdayName ( weekday, [abbreviate], [firstdayofweek] )
The required argument weekday is a number between 1 and 7 that represent a day of the week. The abbreviate argument is optional. It accepts a boolean value, that indicates if the month name is to be abbreviated. If omitted, the default is False, which means that the month name is not abbreviated. The firstweekday argument is also optional. It determines what day is to be the first day of the week. The following is a list of valid parameters for firstweekday.
|vbUseSystem||0||Use the NLS API settings|
|vbSunday||1||Sunday (default used)|
This example uses the WeekdayName function to obtain the name of the day of the week. Now the MyWeekday variable would contain the value of ‘Tuesday’.
You can also use the WeekdayName function in a query.
You cannot test this function online. It works in Access only.