W6 2375 then EC 7151 at Barcelona
Budapest → Barcelona → Milan
Timetable, Barcelona time
08:40W6 2375 from Budapest at the gate
07:30EC 7151 to Milan leaves the gate
22 h 50 apart on the timetable, overnight
EC 7151 leaves 22 h 50 after W6 2375 arrives on the timetable: more than half a day, so not a connection we count.