Rename 'mytable' as appropriate:
SELECT DateDay,
STUFF((SELECT ',' + CAST(SP2.ID AS VARCHAR(10)) FROM dbo.mytable SP2
WHERE SP2.DateDay = SP1.DateDay FOR XML Path('')), 1, 1, '') ID
FROM dbo.mytable SP1
GROUP BY SP1.DateDay
You could alternatively create a function to handle it if this is part of a larger query.