Clearing up and setting date correctly