bmurch71
Board Regular
- Joined
- Oct 15, 2004
- Messages
- 68
I'm using the following expression to return month-to-date sales data:
>=(IIf(Day(Now())=1,DateAdd("m",-1,Now()),DateAdd("d",-Day(Now()),Now()))) And <=Now()-1.
As i understand it, this expression first asks "Is today the first of the month?" If the answer is yes, then the data collected should be for last month, while if it is true, it should look to the current month. however, when I ran this query today, it only pulls data from Feb. 2 through Feb. 28, and I cannot for the life of me figure out why. Any ideas? (Andrew?)
Thanks very much in advance for any help.
Brian
>=(IIf(Day(Now())=1,DateAdd("m",-1,Now()),DateAdd("d",-Day(Now()),Now()))) And <=Now()-1.
As i understand it, this expression first asks "Is today the first of the month?" If the answer is yes, then the data collected should be for last month, while if it is true, it should look to the current month. however, when I ran this query today, it only pulls data from Feb. 2 through Feb. 28, and I cannot for the life of me figure out why. Any ideas? (Andrew?)
Thanks very much in advance for any help.
Brian