AZ 60 then KM 587 at Madrid
Rome → Madrid → Valletta
Timetable, Madrid time
17:10AZ 60 from Rome at the gate
12:30KM 587 to Valletta leaves the gate
19 h 20 apart on the timetable, overnight
KM 587 leaves 19 h 20 after AZ 60 arrives on the timetable: more than half a day, so not a connection we count.