format dates and attachments correctly