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

Find date of the beginning and of LAST week

Status
Not open for further replies.

krets

Technical User
Dec 29, 2006
214
US
Is there a way to find the beginning and end of last week (week starts on Monday and ends on Friday) in a query?
 
Damn fat fingers.

What I would like to do is set the first and last day of the previous week for the WHERE clause of my query. So the query will return only those records with a date of last week.
 
Last Friday is Int(Now()-Weekday(Now(),vbSaturday))
Last Monday is Int(Now()-Weekday(Now(),vbSaturday)-4)

You might need to check the syntax on that, though.

-V
 
When I tried that method I would get a "vbSaturday" text box.

Here's what I ended up doing:

WHERE tblAITInfo.AITDate >= (Date() - WeekDay(Date()) - 6) AND tblAITInfo.AITDate <= (Date() - WeekDay(Date()));

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top