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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

less than 30days till date 1

Status
Not open for further replies.

ralphus

Technical User
Dec 30, 2004
28
0
0
GB
What would i put into criteria so that the query would show all records that have less than 30days till the expiry date is reached.
This fied is in date and time format
Cheers
 
Use the Now() function in the SQL of your query.

Example, table is tblTest with fields MyID and MyDate:
Code:
SELECT MyID, MyDate
FROM tblTest
WHERE MyDate Between Now() And (Now()+30);
Hope this helps.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top