SK 581 then FR 997 at Madrid
Copenhagen → Madrid → Wroclaw
Timetable, Madrid time
12:00SK 581 from Copenhagen at the gate
05:45FR 997 to Wroclaw leaves the gate
17 h 45 apart on the timetable, overnight
FR 997 leaves 17 h 45 after SK 581 arrives on the timetable: more than half a day, so not a connection we count.