Searching for date ranges -this time it's serious
I have a problem I need find an answer to. I have a very specific question, related to a set of complex scripts that work in tandem to deliver the desired result. The answer to this problem is, if you will, the last missing piece of the puzzle.
I'm searching for orders within a given month, using the following script steps:
Enter Find Mode 
Set Field [Order::OrderDate; $$CurrentDate]
Perform Find 
The variable $$CurrentDate has a value that looks like this
I've extracted this value from the date the user inputs. This way the search returns only the orders made within the specified month.
However, there is a similar search I need to do. I need the search to find all the orders that were made in the given month, or before. I.e. if I get "4/2012" as the input, I need to find all the orders from 4/2012, 3/2012, 2/2012, 1/2012, 12/2011, and so on. So far I have no clue as to how to write the search parameter.
If anyone knows how to write a date range parameter, something like "from 12/2011 to 4/2012", that would be helpful, because I know the month when the company started making orders, and I can set it as the start of the range.
If you know how to write a parameter that would find all the records up to a certain date, like "everything up to April 30th, 2012", I'd be interested to see it, but it won't help me that much - the input parameter I get is already shaped to the "4/2012" format, and changing that would be far too time consuming.
Thank you in advance.