IB 52 then IB 817 at Madrid
Málaga → Madrid → Copenhagen
Timetable, Madrid time
15:30IB 52 from Málaga at the gate
11:25IB 817 to Copenhagen leaves the gatealso VY 5189
19 h 55 apart on the timetable, overnight
IB 817 leaves 19 h 55 after IB 52 arrives on the timetable: more than half a day, so not a connection we count.