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!

Select records created last week

Status
Not open for further replies.

barra47

Programmer
Dec 25, 2002
86
0
0
AU
I need to write a query to filter records that were created in the previous week, can you please help me with this one, Thanks in advance

Each record has an OpenDate field.
 
Duane:

Your code will return the last seven days

the previous week Can be more then seven days ago

Try:
Code:
SELECT * 
FROM tblNoNameGiven
WHERE Daterpart("ww",OpenDate)=DatePart("ww",Date())-1;

P.S. You still have to adept for the last week of a year.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top