Access 2007 sort by day of week

  • Thread starter Thread starter J.Curtis
  • Start date Start date
J

J.Curtis

Is there a way to sort data by days of the week. For example Monday, Tues,
Wed, Thur, Fri and not alphabetically?
 
Sure:

DoW: DatePart("w",[YourDateField])

1 is Sunday. If you want Monday to be first:
DoW: DatePart("w",[YourDateField],2)

Put something like above in a query and sort on it.
 
Jerry. I am a beginner and taking on-line classes via microsoft to figure out
this program, so could you give me a few more details as to how to do this?
Maybe simplify for dumbie?
Thanks!


Jerry Whittle said:
Sure:

DoW: DatePart("w",[YourDateField])

1 is Sunday. If you want Monday to be first:
DoW: DatePart("w",[YourDateField],2)

Put something like above in a query and sort on it.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


J.Curtis said:
Is there a way to sort data by days of the week. For example Monday, Tues,
Wed, Thur, Fri and not alphabetically?
 
Jerry. I am a beginner and taking on-line classes via microsoft to figure out
this program, so could you give me a few more details as to how to do this?
Maybe simplify for dumbie?
Thanks!


Jerry Whittle said:
Sure:

DoW: DatePart("w",[YourDateField])

1 is Sunday. If you want Monday to be first:
DoW: DatePart("w",[YourDateField],2)

Put something like above in a query and sort on it.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


J.Curtis said:
Is there a way to sort data by days of the week. For example Monday, Tues,
Wed, Thur, Fri and not alphabetically?

Create a new Query based on your table.
In the leftmost column of the query grid type in Jerry's suggestion:

DoW: DatePart("w",[YourDateField])

Add whatever other fields you want to see.

Select "Ascending" on the Sort row of the query grid under DoW.

Open the query. It will s9ort all the Sundays together, then all the Mondays,
etc. That's what you asked for (of course it might not be exactly what you
want...)
 
Back
Top