W6 2371 then FR 3009 at Madrid
Budapest → Madrid → Milan
Timetable, Madrid time
19:15W6 2371 from Budapest at the gate
14:25FR 3009 to Milan leaves the gate
19 h 10 apart on the timetable, overnight
FR 3009 leaves 19 h 10 after W6 2371 arrives on the timetable: more than half a day, so not a connection we count.