EW 2520 then EC 7173 at Barcelona
Stuttgart → Barcelona → Berlin
Timetable, Barcelona time
08:35EW 2520 from Stuttgart at the gate
07:20EC 7173 to Berlin leaves the gate
22 h 45 apart on the timetable, overnight
EC 7173 leaves 22 h 45 after EW 2520 arrives on the timetable: more than half a day, so not a connection we count.