Comparison operator not working sql

I'm using the following code. It is working fine but when I use the date filter it stops working. I have use the comparison operator in sql. I have searched for questions but have not found the desired answer.