W4 6207 then FR 997 at Madrid
Rome → Madrid → Wroclaw
Timetable, Madrid time
12:15W4 6207 from Rome at the gate
05:45FR 997 to Wroclaw leaves the gate
17 h 30 apart on the timetable, overnight
FR 997 leaves 17 h 30 after W4 6207 arrives on the timetable: more than half a day, so not a connection we count.