return certain dates? (1 Viewer)

bassispunk

Registered User.
Local time
Today, 00:57
Joined
Jun 8, 2001
Messages
10
what is the syntax needed to run a query that will only return data that has been entered within the past 2 weeks. for example, the query will return all entries into a form where the date field falls between the current date and 2 weeks ago. thanks
 

raskew

AWF VIP
Local time
Yesterday, 18:57
Joined
Jun 2, 2001
Messages
2,734
First, lookup "Parameters Declaration" in the help file, then try copying/pasting this parameter query SQL into a new query in Northwind. When prompted to enter mydate, use something like 9/14/94. Hopefully, this will provide sufficient insight to design your own:

PARAMETERS mydate DateTime;
SELECT Orders.*, Orders.OrderDate
FROM Orders
WHERE (((Orders.OrderDate) Between DateAdd("d",-14,[mydate]) And [mydate]));
 

Users who are viewing this thread

Top Bottom