NE 8017 then FR 3814 at Madrid
Cairo → Madrid → Bologna
Timetable, Madrid time
14:05NE 8017 from Cairo at the gate
07:50FR 3814 to Bologna leaves the gate
17 h 45 apart on the timetable, overnight
FR 3814 leaves 17 h 45 after NE 8017 arrives on the timetable: more than half a day, so not a connection we count.