totn Access

MS Access 2003: Using WeekdayName function in a report

This MSAccess tutorial explains how to use the WeekdayName function to display the name of the day in a report in Access 2003 (with screenshots and step-by-step instructions).

Question: In Microsoft Access 2003/XP/2000/97, how can I use the WeekdayName function in a report to return the name of the day from a field containing a date such as 1-Jan-2005?

Answer: Let's look at a report to demonstrate.

In our report, we have an OrderDate field that contains date values such as 1-Jan-2005. We want to display the Weekday name value (such as Monday, Tuesday, Wednesday, etc) for each OrderDate.

Microsoft Access

To do this, we first need to create a text box on the report and give it a unique name such as OrderDate2. Do not call the text box the name of the field that you are applying the WeekdayName function to.

Then you need to enter the following formula in the Control Source property:

=WeekdayName(Weekday([OrderDate]))

This formula first calls the Weekday function to get a numeric value representing the day of the week, and then it calls the WeekdayName function to get the day of the week (ie: Monday, Tuesday, Wednesday, etc.).

Finally, make sure that the Format property is <blank>.

Microsoft Access

Now when we run the report, the Order Date shows up as the day of the week. See below.

Microsoft Access