Formats the date string before displaying