Is there a specific format that the string value needs to follow in order for this function to correctly convert it to the required data type when setting Date Data Types?
I have tried several standard Date string formats e.g.(8/11/2023) without success, and was wondering if anyone has use this function successfully to set the Project's Properties attributes Date data types because it is working for the other data types.
Thanks,
Todd
Most likely yyyy-MM-dd (see ISO 8601 https://en.wikipedia.org/wiki/ISO_8601) and while I haven't tried it for Work Area properties I have used it for environment attributes with Update-PWDocumentAttributes
Robert,
Thank you for your response, but I tried those basic and extended formats and they did not work. I though that maybe because I was getting the Class and Attribute Id's programmatically based on the Project Id that something on my end was wrong, but I verified those values via the ProjectWise Class Editor and everything appears to be correct. The Work Area Date Properties do function as expected when setting them manually so I don't know what else to look at now.
BDN support provided a solution in this response: "I had contacted the PW dev team regarding the issue. One suggestion is that you should try yyyy-MM-dd HH:mm:ss.000. It has been seen some of the date conversions fail without the decimal seconds."
Answer Verified By: Todd Jacobs