cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Modified date Parameter (Creo 2.0)

sholennavar
1-Newbie

Modified date Parameter (Creo 2.0)

Hello

 

I am preparing a template, in which i want to define a parameter for "Date" i.e 'Created Date" and "Modified Date"

The "Created date" will be unchanged even after n number of updates, so i used a parameter "&todays_date".

But problem comes for the "Modified Date", which needs to be updated for every revision of drawing updated,

So for that i used "PTC_WM_MODIFIED_ON" (a parameter already available by default in <Tools>-- <Parameters>

With this parameter i get Date and Time together, but i want date only.

 

Please see the attachment for clear understanding of my question.

 

Thank You

Regards

Sumeet

4 REPLIES 4

Use a relation with extract(PTC_WM_MODIFIED_ON,1,9) to get the date.

BenLoosli
23-Emerald II
(To:Kevin)

Create a relation like this:

SHORT_CREATED_ON = EXTRACT(PTC_WM_CREATED_ON,1,10)

SHORT_MODIFIED_ON = EXTRACT(PTC_WM_MODIFIED_ON,1,10)

In order to 'freeze' the Created date, you need some additional code.

/* INITIAL RELEASE PARAMETERS

/* SET INITIAL VALUES FOR DRAWING PARAMETERS FROM WINDCHILL

/* ONLY WHEN REV IS 0 <-Modify for your revision scheme

if PTC_WM_REVISION == "0"

  INITIAL_CREATED_ON = SHORT_CREATED_ON

endif

You also do this same thing for Created_By

scooke
4-Participant
(To:sholennavar)

I presume that this parameter "PTC_WM_MODIFIED_ON" is and Windchill parameter as I can't get this to work in Creo Parametric.

Searching the forum's there still does not seem to be a simple solution for what must be a universal issue.

HI,

 

The following PTC Article will help and shows different options for formatting the date/time

 

https://www.ptc.com/en/support/article/CS49539?source=search

 

As an example Use the following in your config.pro - date_type_parameter_format %dd-%mm-%yyyy

 

Excerpt from PTC Article on options: -

  • %yyyy  4-digit year (for example, 2015) 
  • %yy  2-digit year (for example, 15) 
  • %MMM  Month (for example, SEP) 
  • %Mmm  Month (for example, Sep) 
  • %Month  Full month name (for example, September) 
  • %mm  Month number, padded to 2 digits (for example, 09) 
  • %m  Month number (for example, 9) 
  • %dd  Date, padded to 2 digits (for example, 05) 
  • %d  Date, no padding (for example, 5)
  • %Hh  Hour number (for example, 04)
  • %mi  Minute number (for example, 10)
  • %ss  Second number (for example, 59)
  • %PM  Adds anti meridian (AM)/post meridian (PM) designation (for example, PM)

 

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags