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

Pull where date is within next 7 days

Status
Not open for further replies.
Jul 21, 2009
13
US
Trying to write a query to pull all products expiring in the next 7 days. I have an expiredate column and the date is in format (yyyy-dd-mm + timestamp). Need to pull any dates = today or within 7 days. Timestamp is always 00:00:00.00. Please help!
 
SELECT *
FROM yourTable
WHERE expiredate BETWEEN CURRENT_DATE AND CURRENT_DATE + INTERVAL '7' DAY

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top