DESPERATELY in need of help on Query last 2 years

isabel2005

Registered User.
Local time
Today, 01:15
Joined
Oct 6, 2005
Messages
19
Hi,

How do I query the last 2 years vs. current date?

Basically, I want to see the record from today date back to 2 years.

Please assist...

Thanks,
Isabel
 

Attachments

By using the DateAdd() function in your query.
 
Use the DateAdd and Date functions to specify a period 2 years prior to current date.

Code:
SELECT tblItems.Code, tblItems.Item, tblItems.Date, tblItems.Price
FROM tblItems
WHERE (((tblItems.Date) Between DateAdd("yyyy",-2,Date()) And Date()));
 

Users who are viewing this thread

Back
Top Bottom