That is due to value of the date-attribute being saved in UTC. You are probably located east of Greenwich, making your local time a couple of hours ahead of UTC-time. If you are in India for example and you save your date-time attribute at a time when the UTC is still on the previous date due to the time-difference, than in the database, the date will be yesterday. If you then make that value show up in a datagrid and make it show only the date, than that date will be yesterday.
Thank you Tim van Steenbergen !