def value_to_db_datetime(self, value):
        if value is None:
            return None
        # SQL Server doesn't support microseconds
        return value.replace(microsecond=0)
Transform a datetime value to an object compatible with what is expected
dataset/ETHPy150Open avidal/django-pyodbc/sql_server/pyodbc/operations.py/DatabaseOperations.value_to_db_datetime