apply date formatting