EC 8064 then U2 804 at Gatwick
Barcelona → London → Edinburgh
Timetable, London time
14:25EC 8064 from Barcelona at the gate
10:45U2 804 to Edinburgh leaves the gate
20 h 20 apart on the timetable, overnight
U2 804 leaves 20 h 20 after EC 8064 arrives on the timetable: more than half a day, so not a connection we count.