FR 3008 then FR 267 at Madrid
Milan → Madrid → Valletta
Timetable, Madrid time
19:50FR 3008 from Milan at the gate
10:00FR 267 to Valletta leaves the gate
14 h 10 apart on the timetable, overnight
FR 267 leaves 14 h 10 after FR 3008 arrives on the timetable: more than half a day, so not a connection we count.