Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying on the Long Date

Status
Not open for further replies.

pnabby

IS-IT--Management
Aug 29, 2004
46
US
I have a restaurant database I built in Microsoft Access. I just changed the date format to see the days of the week and I have another field that indicates Lunch or Dinner.

I need to run a report to look at the lunch performance by specific days of the week. I have tried query parameters
LIKE "Monday," & "*". This does not work.

Do I need to deconcatenate the date field? Any suggestions?
 
Select count(*) from myTable
Group By Weekday(myDateField), myLunchDinnerCode
Order By Weekday(myDateField), myLunchDinnerCode

or stick with your original thought but use .... WEEKDAY(myDateField) = 1 (or 2,3,4,5,6,7) where the days of the week as returned by the WEEKDAY() function are represented by the numbers 1 thru 7 (Sunday=1....Saturday=7).

Dennis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top