statement for querying out mondays or tuesdays.

Fuga

Registered User.
Local time
Today, 06:09
Joined
Feb 28, 2002
Messages
566
How do I make a query return "only mondays" or only tuesday.

Is there perhaps a better way to do this than in a query?

Fuga.
 
you can type 'monday' in the query critera under the column in which monday would appear or 'is like "*monday*" if the word monday appears as part of a sentence.

or is like "*[Please enter day for query]*" to have the user enter a specific day each time the query is run.

or you could filter the query results by pressing the filter button and setting enter the day in the relevant column.

but the query criteria method is probably the best way forward.
 
If you're interested in returning specific weekdays, you can also use the WeekDay() function, combined with the InStr() function. For example, to return Order Dates (from Northwind's Orders) which occurred on Monday, Tuesday or Friday, you could use this:

SELECT orders.*
FROM orders
WHERE (((InStr(" 2 3 6",Weekday([OrderDate])))>0));
 

Users who are viewing this thread

Back
Top Bottom