By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

Set criteria to find date records for this coming weekend

P: 52
Hey guys, i have this code:

Expand|Select|Wrap|Line Numbers
  1. SELECT * 
  2. FROM QueryCases 
  3. WHERE Weekday(QueryCases.StartDate) In ('1','7') AND QueryCases.Completed = False 
  4. ORDER BY QueryCases.StartDate;
the WHERE Weekday(QueryCases.StartDate) In ('1','7') returns any weekend records, how do i set criteria to only show weekend records for this coming weekend. Thanks in advance
Dec 14 '07 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,366
Please use code tags.

This gives you the next saturday.
Expand|Select|Wrap|Line Numbers
  1. Date() + 7 - Weekday(Date())
Add one to that and it'll give you the next sunday.

If it's saturday it'll give you that date.
If it's sunday it'll give you next week.
Dec 14 '07 #2

P: 52
Amazing. thanks a million!
Dec 14 '07 #3

Expert Mod 10K+
P: 12,366
Not a problem, good luck.
Dec 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.