Queries

LEE hepworth

Registered User.
Local time
Today, 12:23
Joined
Nov 14, 2003
Messages
23
Hi
Just need some confirmation. Using a query to find amount of sales between two dates. The start of the week starts on Monday and needs to include the sales for that day and finishes on Saturday and include that day. Sunday there are no sales. Is the below correct

Between DateValue(Date()-(Weekday(Date(),2)+6)) And
DateValue(Date()-Weekday(Date(),2))
 
Unsure of what Correct is as far as this statement goes.

However if you are always wanting the Last fully completed Period then yes.


ie.

If Date()=#12/29/2003# or #12/30/2003# or #12/31/2003#

Your formula produces

Between #12/22/2003# and #12/28/2003#

If Date()=#12/28/2003#

Your formula produces

Between #12/15/2003# and #12/21/2003#
 
Date

Thanks but I'm bit confused

All I want by the above statement is to take the Sales from Monday to Saturday and include these dates ( Mon, sat). So I will run a query called Last Week which will look for sales with these dates, just last week.
 
Your formula produces Monday to Sunday for the week prior to the current date.

Example running this query this week: 12/29/2003 (monday) to 1/4/2004 (sunday) will return data for the week of 12/22/2003 to 12/28/2003.
 

Users who are viewing this thread

Back
Top Bottom