Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I have a table with a column with datetime format .I need to create another column which will contain only date.
Can any one help on this.
Not sure what product you are using, but this area is for the eSupport tools on PTC.com. Things like the knowledge base, case creator, etc. You will probably have better luck posting your question in the appropriate product area.
Where is the datetime coming from?
If from a Windchill parameter, use an extract statement in relations to get the date only portion.
date_only = extract(ptc_wm_created_on,1,10)
This will pull the 10 characters of the date (2018-04-24) from the parameter ptc_wm_created_on. You may use ptc_wm_modified_on depending on your needs.
Not from windchill
Where is the datetime coming from?
In order to be in a table in Creo, it has to be in Creo as a parameter. Use the same extract code, but use your parameter instead of the Windchill one in my example. IF the date is not the first 10 charcaters, adjust the start position (1) and the end position (10) for your string. You can get fancy with relations and totally format any way you want by extracting the various segments.