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);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.