Deleting all records with a Wednesday date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

Can you advise me on how I should go about locating all records with a
date/time that was a Wednesday so that I may then delete these records? The
date/time field is called DateStamp.
Thanks for any help you can give.

Regards,

Lee
 
1. Create a query into this table.

2. In a fresh column in the field row, enter:
WeekDay([DateStamp])

3. In the Criteria row under this field, enter:
4

4. Change it to a Delete query (Delete on Query menu.)

5. Drag the * from the table (upper pane) into the grid (lower pane).

6. Run the query.
 
Lee,

In your query, add a calculated field like:

WDAy: Weekday([DateStamp], 2)

This will return 1 for Mondays, 2 for Tuesdays etc. Just filter for 3's.

HTH,
Nikos
 
Thanks Allen (and Nikos).
Much appreciated.

Lee

+++++++++++++++++++++++++++++++++++++

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

2. In a fresh column in the field row, enter:
WeekDay([DateStamp])

3. In the Criteria row under this field, enter:
4

4. Change it to a Delete query (Delete on Query menu.)

5. Drag the * from the table (upper pane) into the grid (lower pane).

6. Run the query.

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

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

Baby Face Lee said:
Can you advise me on how I should go about locating all records with a
date/time that was a Wednesday so that I may then delete these records?
The
date/time field is called DateStamp.
Thanks for any help you can give.

Regards,

Lee
 

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

Similar Threads

Previous Dates 2
Access General Date Forced To Have Date And Time 2
Help with Update Query - VBA error 2
Converting number dates to Day of Week 2
General Date problem 4
Delete Query 6
Filter Query 2
Query, linked tables 2

Back
Top