×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

PB (9.0) Date Format Problem

PB (9.0) Date Format Problem

PB (9.0) Date Format Problem

(OP)
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?

RE: PB (9.0) Date Format Problem

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

RE: PB (9.0) Date Format Problem

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

RE: PB (9.0) Date Format Problem

should there be a space after format in format"%d... ?

Mark Rief
NX CAM Customer Success
Siemens PLM Software

RE: PB (9.0) Date Format Problem

(OP)
Markrief,
The space didn't work.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources