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
Solved! Go to Solution.
Hi @RL_9925624
Check the type and attribute management to define the last modify display format for all languages.
It works.
Be sure you update correct parameter
there is a "Date Display Format": and you've used "Date Input Field Type" because input can be set to "Date Only' that can not change display format.
Results
You can also check following article CS74270 - How to change the date display format in Windchill
or
CS386714 - Is it possible to change the date format of APPROVED_DATE
PetrH
Hi @RL_9925624
Check the type and attribute management to define the last modify display format for all languages.
It works.
Be sure you update correct parameter
there is a "Date Display Format": and you've used "Date Input Field Type" because input can be set to "Date Only' that can not change display format.
Results
You can also check following article CS74270 - How to change the date display format in Windchill
or
CS386714 - Is it possible to change the date format of APPROVED_DATE
PetrH
Hi PetrH,
Thank you! It worked perfectly. Previously, I had tried this setting, but I missed filling it out for all languages.
Thanks again,
Richard