Fixed parse error with dates due to unprepared query.

Fix a parse error with between filter. WIth unprepared dates, the space and the semicolumn into the MYSQL date format causes issues.