Joined: 04 Nov 2009
Online Status: Offline
Posts: 123
Topic: How to filter by month and year, but not full date Posted: 14 Dec 2009 at 3:16pm
I have a table I have to retrieve data from for a report. The table has a field for month number(1-12) and year (2009). I have to build a report to see the next 12 months of data from any given date.
The closest I came was
(field.year) >= Year(CurrentDate()) and (field.month) >= Month(CurrentDate());
When I run the report all I get is Dec. 2009 and Dec 2010 info, but nothing in between. I tried to add 11 to the month number, but it then goes past 12 which tells me I am doing something wrong.
* I do not have an actual date field in the table, just these two fields.
Joined: 04 Nov 2009
Online Status: Offline
Posts: 123
Posted: 16 Dec 2009 at 11:31am
Thank you both. That worked like a charm. I am fairly new in a position and you all the great help I have received on this forum have really helped me out a lot.
Joined: 08 Mar 2011
Online Status: Offline
Posts: 1
Posted: 08 Mar 2011 at 7:38am
Hello,
Just joined the forum. This is close to the solution I need but I need a little more help.
The table I am working from has month and year in separate fields. I need to filter the data to six or more orders in each of the last three months; currently it is returning records of 6 or more orders in any of the last three months.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum