Formatting of the dates and tidying up the output