Added escape characters to Date query