def render_literal_value(self, value, type_):
        # datetime and date are both subclasses of datetime.date
        if issubclass(type(value), datetime.date):
            # SQL Server wants single quotes around the date string.
            return "'" + str(value) + "'"
        else:
            return super(MSSQLStrictCompiler, self).\
                render_literal_value(value, type_)
For date and datetime values, convert to a string
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/base.py/MSSQLStrictCompiler.render_literal_value