Hello,
I have this query that has log-on date, and below is my sample query. My problem right now is the user wants to skip the weekends when counting backwards. I know there should be a way but seriously I'm starting pulling my hair here. Please help.
example:
- Now() is equal May 2, 2011
- My query pulls all records happens from April 29 backwards.
- My user wants to start the counting from April 27 instead because they want to count the weekends.
I hope I explain this very well. Thanks!
Or how can I do the mathematical calculation of the now()-3 business day before passing it to the next query?
I have this query that has log-on date, and below is my sample query. My problem right now is the user wants to skip the weekends when counting backwards. I know there should be a way but seriously I'm starting pulling my hair here. Please help.
Code:
SELECT Name, [LastLog]from tablename WHERE [Last Log On]<=now()-Weekday(3);
- Now() is equal May 2, 2011
- My query pulls all records happens from April 29 backwards.
- My user wants to start the counting from April 27 instead because they want to count the weekends.
I hope I explain this very well. Thanks!
Or how can I do the mathematical calculation of the now()-3 business day before passing it to the next query?
Comment