FR 5898 then W4 6312 at Madrid
Torino → Madrid → Milan
Timetable, Madrid time
15:10FR 5898 from Torino at the gate
09:55W4 6312 to Milan leaves the gate
18 h 45 apart on the timetable, overnight
W4 6312 leaves 18 h 45 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.