FR 9840 then EC 3876 at Lisbon
Cologne → Lisbon → Milan
Timetable, Lisbon time
22:40FR 9840 from Cologne at the gate
20:25EC 3876 to Milan leaves the gate
21 h 45 apart on the timetable, overnight
EC 3876 leaves 21 h 45 after FR 9840 arrives on the timetable: more than half a day, so not a connection we count.