EW 4601 then DY 2031 at Arlanda
Berlin → Stockholm → Riga
Timetable, Stockholm time
15:25EW 4601 from Berlin at the gate
14:00DY 2031 to Riga leaves the gate
22 h 35 apart on the timetable, overnight
DY 2031 leaves 22 h 35 after EW 4601 arrives on the timetable: more than half a day, so not a connection we count.