Edit: A photo via Daniel's Google+ page "Just walking the dogs..." (link is shared via this site's page) + Daniel confirms the cameo in this video at the Stage Door (The Cripple of Inishmaan on Broadway)
Update: 16th July 2015. Via CinemaBlend there's more about his role and how he ended up in the film.
Trainwreck comes out on 24th July 2015 in the US, 27th August 2015 in Holland & 28th August 2015 in the UK. No further info about the film hasn't been released either, they are being kept under wraps.