View Full Version : Volume Queries Between 7day ago and now.


Sunamon
09-24-2001, 01:56 PM
Hi All, first of all I must apologize, for I am a newbie to access design...
Now with that taken care of here we go... I have a database which is a work order database, and I'm currently trying to design a query which will return the work orders completed in the last 7 days. But I have been unable to discover how to acomplish this. Please help! Thank you all in advance.

Sunamon
09-24-2001, 01:58 PM
Darnit I made two topics, sorry o' admin like people.

Sunamon
09-24-2001, 01:59 PM
Never mind it seems to be gone now...

imboden
09-24-2001, 02:42 PM
Sunamon-

Maybe dateadd() function be helpful here. Try something like:

SELECT tblPurchases.purchaseID, tblPurchases.Datex
FROM tblPurchases
WHERE (((tblPurchases.Datex)>=DateAdd("d",now(),-7)));

This give you everything during past week.

Sunamon
09-25-2001, 07:28 AM
Ok thanks I'll try that. Also I was wondering what will happen on, say the 4th day of a month and you subtract 7 from the day. Will it return a negative day? or will it role over? or will access account for adjusting the month and day... or year for that matter?