DY 3705 then DY 3502 at Copenhagen
Madrid → Copenhagen → Edinburgh
Timetable, Copenhagen time
15:40DY 3705 from Madrid at the gate
09:10DY 3502 to Edinburgh leaves the gate
17 h 30 apart on the timetable, overnight
DY 3502 leaves 17 h 30 after DY 3705 arrives on the timetable: more than half a day, so not a connection we count.