Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

post help on date


DavidB
 Share

Recommended Posts

I have this code in my post...

"(PROGRAM CREATED ON THE -", date$," ", time$, ")",e$

 

What it outputs is (PROGRAM CREATED ON THE - 01-12-05 14:10 )

 

How can I make the year read 2005 instead of 05.

I cant find where it gets the date format from in the post, is it from windows?

 

Thanks cheers.gif

Link to comment
Share on other sites

David,

 

You may want to try using the DAY$, MON$ and YEAR$ internal variables to access the individual components of the current date. Seeing as we may assume that the year starts with "20" for the next couple of years, you could sent up a formatting statment like:

 

fs 14 1 0n # or an FMT statement similar...

 

fmt 14 day$

fmt 14 mon$

fmt 20 14 year$

 

You could then have your output line read:

 

SPACES$=0

"(PROGRAM CREATED ON - ", year$, "-",mon$, "-", day$," @ ", time$, " )",e$

SPACES$=1

 

Your output should then look like this:

 

(PROGRAM CREATED ON - 2005-11-30 @ 14:10 )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...