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
 
Back
Top