View Full Version : Sorting by weekdays in a query or report


drewdt3
02-24-2005, 08:14 AM
I am having major problems trying to sort my report by days of the week. I have converted the date into weekdays but it still trys to sort it by the date (numerically). is this poss. and if so what do I do?

The method I have used to add the day of the week is to add another text box and enter =[date] and then go into properties/format and entered "ddd".
Mon, Tue etc. shows up on the report but when I try to sort by that box it still insists on sorting by the numerical date.

I've also put a line in the query in a similar manor but it won't even sort correctly using that method.

Before I get bald trying, could anyone come to my rescue. :confused:

Uncle Gizmo
02-24-2005, 08:29 AM
Use this expression in your query:
Expr1: DatePart("w",[weekdate])

Where "weekdate" is the name of the field that holds the date you want to sort by weekday.

The Access help is the notoriuosly difficult get any information from. I mention this good tip about the help.
There are two levels of help, if you search for help when you are editing the form or query then you get the basic form of help. However if you want the advanced help you can get this by entering the code behind a form and clicking help there.

drewdt3
02-24-2005, 09:24 AM
Uncle gizmo

Ta very much!!!

Drewdt3 :D