Removing dates that fall on a weekend

G

Guest

I have a MS Access table that includes 7 days in a week. I need to make a
querie that removes dates that fall on a weekend. (So I'll just have data
returned Monday through Friday)
Thanks for any help!
 
A

Allen Browne

1. Create a query into this table.

2. Change it to a Delete query (Delete on Query menu).
Access adds a Delete row to the grid.

3. Drag the * from the table in the upper pane into the grid.
Accept From in the Delete row under this field.

4. In a fresh column of the Field row, enter:
WeekDay([Date1])
replacing "Date1" with the name of your field.
Accept Where in the Delete row.

5. In the Criteria row under this field, enter:
1 or 7

6. Run the query.

All Sundays (day 1) and Saturdays (day 7) will be removed.
 
J

John Spencer (MVP)

Just a word of warning in case Allen Browne misunderstood. This procedure will
PERMANENTLY delete the records. If that is not what you want then post back for
a modification to the query.

Allen said:
1. Create a query into this table.

2. Change it to a Delete query (Delete on Query menu).
Access adds a Delete row to the grid.

3. Drag the * from the table in the upper pane into the grid.
Accept From in the Delete row under this field.

4. In a fresh column of the Field row, enter:
WeekDay([Date1])
replacing "Date1" with the name of your field.
Accept Where in the Delete row.

5. In the Criteria row under this field, enter:
1 or 7

6. Run the query.

All Sundays (day 1) and Saturdays (day 7) will be removed.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Coldtail88 said:
I have a MS Access table that includes 7 days in a week. I need to make a
querie that removes dates that fall on a weekend. (So I'll just have data
returned Monday through Friday)
Thanks for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top