Find all rows based on day of week

Posted on 2011-03-23
Last Modified: 2012-05-11
I am importing an appointment schedule from an old software into a new one.  I have a situation where I need to seperate out some appointments.  Is there any way I can query the appointments table and say something like this:

SELECT * FROM Appointments WHERE DATE is a Tuesday?

This way I'll get all appointments that were scheduled on a Tuesday.  And I'll need to do the same for other weekdays as well.

NOTE:  I can pull this table into SQL Server 2008 if that makes querying easier.
NOTE:  All dates are in the year 2011.

Question by:JamesNT
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35198163
in access, you can use





Expert Comment

ID: 35198204
There is a function: (my date-field is called 'dag')


You can filter on this.

Thomas Roes
LVL 18

Accepted Solution

p912s earned 500 total points
ID: 35198253
Your complete SQL string would be like this.

SELECT * FROM Appointments WHERE ((Weekday([YOURDATEFIELDHERE])="3"));

LVL 44

Expert Comment

ID: 35199944
3 above should not be in quotes
LVL 18

Expert Comment

ID: 35202332
Thanks for the grade and points!

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now