Tags: access, appointments, database, field, microsoft, mysql, oracle, sorting, sql, table, text, weekly

sorting by day of the week?

On Database » Microsoft Access

1,239 words with 1 Comments; publish: Wed, 28 May 2008 19:15:00 GMT; (250140.63, « »)

I have a table with a field called "day" which is just "monday" "tuesday"

etc. for a list of weekly appointments I keep. I used a text field only

because there is no option to just put the day of the week as a date field

datatype. Now I can't sort it by day of the week; if I sort alphabetically,

it gives me the days in alphabetical order.

How can I sort by date (monday first, etc.)?

Thanks.

Barbara

All Comments

Leave a comment...

  • 1 Comments
    • dwae2000 wrote:

      > I have a table with a field called "day" which is just "monday"

      > "tuesday" etc. for a list of weekly appointments I keep. I used a

      > text field only because there is no option to just put the day of the

      > week as a date field datatype. Now I can't sort it by day of the

      > week; if I sort alphabetically, it gives me the days in alphabetical

      > order.

      > How can I sort by date (monday first, etc.)?

      > Thanks.

      > Barbara

      Use a date field formatted to show the day of the week and a calculated

      field to show the day number, sort on the number.

      You could also use a table with fields for the day number and name. This

      would allow a combobox to fill in the date and number.

      #1; Wed, 28 May 2008 19:17:00 GMT