FR 573 then FR 5493 at Madrid
Porto → Madrid → Milan Bergamo
Timetable, Madrid time
15:55FR 573 from Porto at the gate
10:15FR 5493 to Milan Bergamo leaves the gate
18 h 20 apart on the timetable, overnight
FR 5493 leaves 18 h 20 after FR 573 arrives on the timetable: more than half a day, so not a connection we count.