Setting the date correctly