Custom Last modified attribute that shows only the date
Version: Windchill 13.0
Use Case: Creating a custom "Last Modified Date" attribute that displays only the date.
Description:
Hi All,
I would like to create a custom attribute under the wtDocument type that represents the last modification date in yyyy-mm-dd format. Currently, the "Last Modified" (thePesristInfo.modifyStamp) attribute contains both the date and time of the last modification. I need this new attribute to display the date only, without the time.
I tried to accomplish this by creating a calculated attribute derived from "Last Modified," but unfortunately, string operations are not supported in the calculated attribute formula. I also couldn't use a regular expression in the constraints tab to remove the time portion.
I experimented with alias attributes and successfully mapped my custom attribute to the creation date of the wtDocumentMaster object (masterReference^wt.doc.WTDocumentMaster~thePersistInfo.createStamp). I then changed the display format to "Date Only." However, this approach doesn't work for the "Last Modified" attribute, as it cannot be mapped to wtDocumentMaster. The wtDocument object and its master differ in this regard. Additionally, I couldn't map my custom attribute to wtDocument's "Last Modified" (thePesristInfo.modifyStamp) because I encountered an error stating that this attribute already exists for this type.
I also attempted to modify the OOTB "Last Modified" attribute's display format to "Date Only," but this change had no effect.
Do you have any suggestions for creating a custom "Last Modified Date" attribute that displays only the date?
Thank you,
Richard



