GQ 219 then IB 840 at Athens
Heraklion → Athens → Madrid
Timetable, Athens time
12:20GQ 219 from Heraklion at the gate
07:15IB 840 to Madrid leaves the gate
18 h 55 apart on the timetable, overnight
IB 840 leaves 18 h 55 after GQ 219 arrives on the timetable: more than half a day, so not a connection we count.