FrEaK_aCcIdEnT
Board Regular
- Joined
- May 1, 2012
- Messages
- 104
- Office Version
- 365
- Platform
- Windows
- Web
Query criteria attempting to be used:
IIf(Day(Date())<=7,Between Date()-Day(Date())+1 And Date(),Between Date()-Day(Date())+1 And Date()-Weekday(Date(),2))
I have used both Between statements individually.
This one has been what I have been using by itself to pull from the 1st day of the month through the most recent Sunday.
Between Date()-Day(Date())+1 And Date()-Weekday(Date(),2))
Since there isnt a most recent Sunday for this month, it returns nothing. So I have used this to get the desired result until this next Sunday. (Data pull is done daily).
Between Date()-Day(Date())+1 And Date()
I tried to put them into an IIF statement using the criteria that if today's day is <= 7 then X,Y.
Any help would be greatly appreciated. I am stumped... I have tried datediff to try to pull the number between the 1st of the month and today. I have also tried datepart to get the day.
All attempts at the IIF statement have returned 0 results for the query.
IIf(Day(Date())<=7,Between Date()-Day(Date())+1 And Date(),Between Date()-Day(Date())+1 And Date()-Weekday(Date(),2))
I have used both Between statements individually.
This one has been what I have been using by itself to pull from the 1st day of the month through the most recent Sunday.
Between Date()-Day(Date())+1 And Date()-Weekday(Date(),2))
Since there isnt a most recent Sunday for this month, it returns nothing. So I have used this to get the desired result until this next Sunday. (Data pull is done daily).
Between Date()-Day(Date())+1 And Date()
I tried to put them into an IIF statement using the criteria that if today's day is <= 7 then X,Y.
Any help would be greatly appreciated. I am stumped... I have tried datediff to try to pull the number between the 1st of the month and today. I have also tried datepart to get the day.
All attempts at the IIF statement have returned 0 results for the query.