'For date and datetime values, convert to a string
format acceptable to MSSQL. That seems to be the
so-called ODBC canonical date format which looks
like this:
yyyy-mm-dd hh:mi:ss.mmm(24h)
For other data types, call the base class implementation.'

def render_literal_value(self, value, type_):

    if issubclass(type(value), datetime.date):
        return (("'" + str(value)) + "'")
    else:
        return super(MSSQLStrictCompiler, self).render_literal_value(value, type_)
