Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Query

Status
Not open for further replies.

susanlang

Programmer
Mar 26, 2002
9
GB
I am trying to do a query to flag up an item which is due two weeks later?

I hope this make sense.

Thanks
 
Hi Susan,

Let's say your table is called tblOrder, and the "date due" field within it is called DateDue and is of a Date/Time datatype. The following query should then return all records due within the next two weeks:

Code:
SELECT * FROM tblOrder WHERE DateDue BETWEEN Now() AND (Now()+14);

Equally, the following should return all records due in more than two weeks:

Code:
SELECT * FROM tblOrder WHERE DateDue > (Now()+14);

HTH. [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top