FR 3181 then W4 6316 at Barcelona
Rome → Barcelona → Milan
Timetable, Barcelona time
13:40FR 3181 from Rome at the gate
13:10W4 6316 to Milan leaves the gate
23 h 30 apart on the timetable, overnight
W4 6316 leaves 23 h 30 after FR 3181 arrives on the timetable: more than half a day, so not a connection we count.