Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Version: Windchill 13.0
Use Case: Display the Last Modified date in yyyy-MM-dd format in Office documents
Description:
Hi All,
I’m reaching out for advice on a challenge I’ve encountered while trying to display the Last Modified date of a document in Office documents using the Office Worker. The issue lies in the fact that the Last Modified attribute is of the Date & Time type, meaning it includes both the date and the precise time. However, I only need the date (yyyy-MM-dd format) in the Office document.
Here’s what I’ve tried so far:
Successfully Displayed Created On date
I managed to pass the Creation Date to Office Worker by creating a custom alias attribute that referenced the WTDocumentMaster Created On. I set this alias attribute to the Date only type, and it worked perfectly.
Issues with the Last Modified Attribute
When attempting the same approach for the Last Modified attribute, I encountered several challenges:
Attempted a Calculated String Attribute
I also tried creating a custom String-type calculated attribute that references the formatted Last Modified attribute (yyyy-MM-dd). Unfortunately, this approach didn’t work either. Both the calculated attribute and the formatted Last Modified attribute appeared in the yyyy-MM-dd HH:mm:ss <zone_id> format in the Office documents and also in the UI. When I removed the formula from the calculated attribute, the Last Modified attribute returned to customized display format (yyyy-MM-dd).This feels like a potential bug.
Do you have any ideas how could I display the Last Modified date in yyyy-MM-dd format in Office documents? Is it even possible without code customization? Any insights or suggestions would be greatly appreciated.
Thank you!
Richard
Hi @RL_9925624
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.
Best regards,