By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 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;
  5.  
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


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

This gives you the next saturday.
Expand|Select|Wrap|Line Numbers
  1. Date() + 7 - Weekday(Date())
  2.  
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

Rabbit
Expert Mod 10K+
P: 12,315
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.