FR 9856 then IB 796 at Vienna
Helsinki → Vienna → Madrid
Timetable, Vienna time
21:05FR 9856 from Helsinki at the gate
19:45IB 796 to Madrid leaves the gate
22 h 40 apart on the timetable, overnight
IB 796 leaves 22 h 40 after FR 9856 arrives on the timetable: more than half a day, so not a connection we count.