A
Adam
Hi All,
Apologies if this is a simple query but I'm more an excel guru so I get
my applications mixed up !
I have a query and in the query I have a criteria formula on the date
field. This is below:
Between DateSerial(Year(Date()),Month(Date())-1,21) And
DateSerial(Year(Date()),Month(Date()),21)
This means that it takes searches between the 21st of last month to the
21st of this month.
Unfortunately this falls down as its now June so its searching between
21st May to 21st June, its not the 21st June yet !
What I want is like the below formula (it doesn't actually work
though):
=IF(DAY(now())<21,Between DateSerial(Year(Date()),Month(Date())-2,21)
And DateSerial(Year(Date()),Month(Date())-1,21)ELSE Between
DateSerial(Year(Date()),Month(Date())-1,21) And
DateSerial(Year(Date()),Month(Date()),21))
So if were not at the 21st day of the month yet it takes the 21st of 2
months ago to the 21st of 1 month ago, otherwise do as normal, 21st of
last month to 21st of this month.
Anyone know how to correct my query formula please ??
Adam
Apologies if this is a simple query but I'm more an excel guru so I get
my applications mixed up !
I have a query and in the query I have a criteria formula on the date
field. This is below:
Between DateSerial(Year(Date()),Month(Date())-1,21) And
DateSerial(Year(Date()),Month(Date()),21)
This means that it takes searches between the 21st of last month to the
21st of this month.
Unfortunately this falls down as its now June so its searching between
21st May to 21st June, its not the 21st June yet !
What I want is like the below formula (it doesn't actually work
though):
=IF(DAY(now())<21,Between DateSerial(Year(Date()),Month(Date())-2,21)
And DateSerial(Year(Date()),Month(Date())-1,21)ELSE Between
DateSerial(Year(Date()),Month(Date())-1,21) And
DateSerial(Year(Date()),Month(Date()),21))
So if were not at the 21st day of the month yet it takes the 21st of 2
months ago to the 21st of 1 month ago, otherwise do as normal, 21st of
last month to 21st of this month.
Anyone know how to correct my query formula please ??
Adam