FR 689 then FR 267 at Madrid
Vienna → Madrid → Valletta
Timetable, Madrid time
19:00FR 689 from Vienna at the gate
18:40FR 267 to Valletta leaves the gate
23 h 40 apart on the timetable, overnight
FR 267 leaves 23 h 40 after FR 689 arrives on the timetable: more than half a day, so not a connection we count.