U2 810 then BA 2642 at Gatwick
Edinburgh → London → Málaga
Timetable, London time
16:35U2 810 from Edinburgh at the gate
14:35BA 2642 to Málaga leaves the gate
22 h apart on the timetable, overnight
BA 2642 leaves 22 h after U2 810 arrives on the timetable: more than half a day, so not a connection we count.