Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2001
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Access 2000 (Access 2000)

    I want to determine which day during the week different traffic occurs the most. I am trying to sort the day of the week, restricted between two dates (like a particular month) to determine when say phone traffic is highest. I've been trying to enter an expression in the query grid. The query is out of only one table, but I'm not figuring it out. The query is currently returning the date as Long Date, so the day of the week is available to see. It is currently being sorted chronilogically, not by day of week. How can I determine which day of the week occurs most often during that peiod of time.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Access 2000 (Access 2000)

    Instead of the date itself, use a calculated field Weekday([DateField]) where DateField should be replaced by the name of your date field. This returns 1 for a Sunday, 2 for a Monday etc.
    Make your query into a Totals query. Then, you can group by the calculated weekday field and count or sum another field.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Access 2000 (Access 2000)

    In your query, use this expression as the Field name to get the day of the week:

    MyDOW: Format([DateFieldName],"dddd")

    This should give you what you need.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •