- $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom );
- $ccl_query .= "acqdate,st-date-normalized,le=" . $dateto->output("iso");
+ if ($QParser) {
+ $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom );
+ $ccl_query .= "acqdate(-" . $dateto->output("iso") . ')';
+ } else {
+ $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom );
+ $ccl_query .= "acqdate,st-date-normalized,le=" . $dateto->output("iso");
+ }