In my case, the date passed from Python to SQL was not formatted correctly. Once it was passed as 'yyyy-mm-dd' to the SQL Statement, then problem was solved.