Skip to Content
0
Former Member
Nov 20, 2008 at 09:47 PM

Select Expert: Month and Year two different fields, need suggestion

15 Views

This may be very simple, but I'm having a total brainfart today so here I am...

I have two fields, one is a MONTH field which is obviously a 1 to 2 digit number field, and a YEAR field; a 4 digit number field.

I have 4 parameters that will utilize the MONTH and YEAR fields as a selection criteria. Two paramters are for Start-Month and Start-Year, and the other two; End-Month and End-Year.

Basically, I want users to be able to select everything between the Starts and the Ends.

The problem is, for example, if I put in the criteria as starting 02 (Feb) as Start-Month, 2007 as Start-Year, and 11 (Nov) as End-Month, 2008 as End-Year, it will select everything between February 2007 - December 2007, then February 2008 - November 2008. The problem lies in the fact that it will skip January 2008 since, technically, it is not defined according to my Select Expert.

I'm pretty sure this is a simple solution to get the range I want but I just can't think today for some reason.

Any suggestions?

Currently

({table.MONTH} >= {?Start-Month} and {table.YEAR} >= {?Start-Year}) and
({table.MONTH} <= {?End-Month} and {table.YEAR} <= {?End-Year})