FR 789 then FR 4166 at Lisbon
Bologna → Lisbon → Vienna
Timetable, Lisbon time
18:15FR 789 from Bologna at the gate
18:10FR 4166 to Vienna leaves the gate
23 h 55 apart on the timetable, overnight
FR 4166 leaves 23 h 55 after FR 789 arrives on the timetable: more than half a day, so not a connection we count.