Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PB (9.0) Date Format Problem

Status
Not open for further replies.

wrightce16

Industrial
Mar 15, 2016
27
Simple way to change the standard mom_date "APR 12, 2016" over to 04/12/2016?

I'm trying to follow an example that I have but it doesn't seem to be working.

Also, how to change the military time clock to regular time with AM & PM used?
 
Replies continue below

Recommended for you

This what I use in post builder.

global dt
# gets date/time in format better than mom_date
set dt [string toupper [clock format [clock seconds] -format "%d-%b-%Y %I:%M %p"]]

Rick D.

Win7 64 bit w/NX9.0.3.4 MP9 and NX10.0.3
Vericut 7.4
 
Try this in a custom command in Program Start Sequence.

global dt
set dt [string toupper [clock format [clock seconds] -format "%d-%b-%Y %I:%M %p"]]

global mom_output_file_basename
set mom_output_file_basename [string toupper $mom_output_file_basename]

global mom_definition_file_name

set full_postname [file rootname $mom_definition_file_name]
set post_filename [lindex [file split $full_postname] end]
set post_filename [string toupper $post_filename]

MOM_output_literal "\015"
MOM_output_literal "(DATE: $dt)"
MOM_output_literal "(POST NAME: $post_filename)"
MOM_output_literal "(PART NAME: $mom_output_file_basename)"
MOM_output_literal "\015"
MOM_output_literal "\015"


Win7 64 bit w/NX9.0.3.4 MP9 and NX10.0.3
Vericut 7.4
 
should there be a space after format in format"%d... ?

Mark Rief
NX CAM Customer Success
Siemens PLM Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor