Fixed parse error with dates due to unprepared query.