Formats the dates field.