BA 581 then BA 464 at Heathrow
Milan → London → Madrid
Timetable, London time
13:55BA 581 from Milan at the gate
13:25BA 464 to Madrid leaves the gate
23 h 30 apart on the timetable, overnight
BA 464 leaves 23 h 30 after BA 581 arrives on the timetable: more than half a day, so not a connection we count.