transforming date into date-format