U2 8020 then U2 804 at Gatwick
Madrid → London → Edinburgh
Timetable, London time
18:10U2 8020 from Madrid at the gate
16:00U2 804 to Edinburgh leaves the gate
21 h 50 apart on the timetable, overnight
U2 804 leaves 21 h 50 after U2 8020 arrives on the timetable: more than half a day, so not a connection we count.