FR 8249 then FR 5315 at Madrid
Milan → Madrid → Rome
Timetable, Madrid time
10:50FR 8249 from Milan at the gate
08:55FR 5315 to Rome leaves the gate
22 h 05 apart on the timetable, overnight
FR 5315 leaves 22 h 05 after FR 8249 arrives on the timetable: more than half a day, so not a connection we count.