FR 9673 then EC 7646 at Madrid
Rome → Madrid → Lisbon
Timetable, Madrid time
23:30FR 9673 from Rome at the gate
18:00EC 7646 to Lisbon leaves the gate
18 h 30 apart on the timetable, overnight
EC 7646 leaves 18 h 30 after FR 9673 arrives on the timetable: more than half a day, so not a connection we count.