Hi,
In the attached MPP file, the Custom Field “PMC Baseline Start” (Text25) contains a formula:
IIf([Baseline Estimated Start]=projdatevalue(“NA”),"",Format([Baseline Estimated Start],“YYYY-MM-DD”))
When opened in MS Project, the correct date is displayed in format yyyy-mm-dd, however when we retrieve the value of this field with Aspose (through ExtendedAttribute.getValue() ), it will return a long Date String with hours included, such as:
10/12/2009 8:00:00 PM
After a quick look in Aspose (obfuscated) code, I found that Aspose will return a different value than the “normal” one if the ExtendedAttribute is read-only (plus another unknown criteria):
public String getValue()
{
if ((getValueReadOnly()) && (c())) {
return d();
}
return this.b; // b is where the correct value is.
}
When I use reflection to retrieve the value of the private field b , I got the correct value for the custom field, i.e. the date in format yyyy-mm-dd as displayed in MS Project.
1) Is this a bug or is there a valid reason for not returning the same value as the one visible in MS Project?
2) If there’s a good reason for this behavior, is there a supported way to retrieve the “visible” value that appears in the MS Project custom field? I’m only interested in retrieving the custom field value in the same form as what is displayed in MS Project.
Kind Regards,
Etienne.