EC 1703 then EC 7646 at Madrid
Nice → Madrid → Lisbon
Timetable, Madrid time
20:40EC 1703 from Nice at the gate
18:00EC 7646 to Lisbon leaves the gate
21 h 20 apart on the timetable, overnight
EC 7646 leaves 21 h 20 after EC 1703 arrives on the timetable: more than half a day, so not a connection we count.