FR 5322 then AV 6204 at Madrid
Milan → Madrid → Rome
Timetable, Madrid time
19:45FR 5322 from Milan at the gate
18:00AV 6204 to Rome leaves the gate
22 h 15 apart on the timetable, overnight
AV 6204 leaves 22 h 15 after FR 5322 arrives on the timetable: more than half a day, so not a connection we count.