Date search by week

mlamont

Registered User.
Local time
Today, 07:41
Joined
Jun 25, 2001
Messages
45
Could anybody help me create a search?

I have a list of data entries that has a date attached, I need be able to narrow the search down by searching for all data entries dated for a week past, 2 weeks past, 3 weeks, up to a month. I.e. Its November 14, and I want to run a search for all entries during the past week.

If anybody could help me I would appreciate it.

Mike
 
You could use a query like the following
Code:
SELECT
  DatePart("ww", [EventDate], 2, 2) AS LastWeek
, Q.EventDate
, Q.Event
FROM qselEvent AS Q
WHERE (((DatePart("ww", [EventDate], 2, 2)) = DatePart("ww", DateAdd("d", -7, Date()), 2, 2)));
it will give you the results for the last calendar week. It is also possible to use BETWEEN ... AND ... in the where clause with date limits.

hth nouba
 

Users who are viewing this thread

Back
Top Bottom