Description
Use PSCGetCalendarFilterStrEx when you need to create SQL WHERE clause from the set of dates. Conditions will be constructed for the field indicated in DateField parameter. Parameters SelStart and SelFinish must specify the range of dates in a set. Function will have the access to the set of dates through callback function that must be specified in DateSelectedProc parameter. Callback function will receive as a parameter date and must return True if it is in the set of fields or False in other case. Parameter DateFormat must specify the format of date in SQL clause. Through OrStr and AndStr parameters PSCGetCalendarFilterStrEx function receives the information about local settings for OR and AND reserved words.
You can leave OrStr and AndStr parameters empty then OR and AND constants will be 'OR' and 'AND' corresponding. If DateFormat parameter is nil then DateTime format will be obtained from windows local settings.
Note: If there is a successive line of more that three days in the set of dates PSCGetCalendarFilterStrEx rolls it up in a complex condition.
For example : Line of dates : '01/02/99, 02/02/99, 03/02/99, 04/02/99, 07/02/99' for field 'ShipDate' will be rolled up in '( ( ShipDate >= 01/02/99 ) AND ( ShipDate < 05/02/99 ) ) OR ( ShipDate = 07/02/99 )' condition.