Validate and format dates in metadata.