Filtering for previous months

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a date field and want to filter based on either 6 months previous or
12 months previous ie: those with bi-annual checks or annual checks. My
expressions work fine the last half of the year but not the first half ie:
(now)() -6 when now =Jan. HELP PLEASE
 
On Tue, 4 Jan 2005 07:59:07 -0800, Jeff C <Jeff
I have a date field and want to filter based on either 6 months previous or
12 months previous ie: those with bi-annual checks or annual checks. My
expressions work fine the last half of the year but not the first half ie:
(now)() -6 when now =Jan. HELP PLEASE

try:
Dateserial(year(date),month(date)-6,day/date))
 
I am extracting the records by filtering a report in the control source with
"month([current tb test date])=month(Now())-6)"
which worked fine until we got to January.

I tried your solution and it returned operator/syntax error

Thank you for trying for me anyway
 
I am extracting the records by filtering a report in the control source with
"month([current tb test date])=month(Now())-6)"
which worked fine until we got to January.

I tried your solution and it returned operator/syntax error
does this mean you only want the Data for month=7 ?

month([current tb test date])=month(dateserial(2000,month(date)-6,1)

I used 2000 as a year, because for every year its the same
 
Thanks for your effort I ended up using the following:

month(DateAdd("m",-6,Date()))

Andi Mayer said:
I am extracting the records by filtering a report in the control source with
"month([current tb test date])=month(Now())-6)"
which worked fine until we got to January.

I tried your solution and it returned operator/syntax error
does this mean you only want the Data for month=7 ?

month([current tb test date])=month(dateserial(2000,month(date)-6,1)

I used 2000 as a year, because for every year its the same
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top