The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Time & Date Stamp
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mark H Ungurian

Canada
6 Posts

Posted - 03/22/1999 :  3:05:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How can I format the time&date stamp on a graph to show ie. March 22/99 instead of the usual 3/22/99 13:20:18? I've searched all over the place, but I keep comming up empty.
Thanks. MHU.

Hi Greg
This is exactly what I was looking for
The origin tip works well.
Thanks again!

[This message has been edited by Mark H Ungurian (edited 03-24-99).]

greg

USA
1379 Posts

Posted - 03/23/1999 :  5:16:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The Date & Time button on the Graph toolbar runs a script in the [DateTime] section of the STANDARD.OGS file. That script consists of

label -s -sa -d (.6*page.width) (.05*page.height) -n timestamp $(@D,D10);

The $(@D,D10) is the key to customizing the format. In this case we are asking for the 10th (numbered from zero) date format from the Origin Date Format list (which is M/D/YYYY HH:MM:SS).

In your case, getting the precise format you want could be quite complicated. For an example that doesn't deal with the 'leading zero' issue, try:

%A=$(@D,D11);
%B=January February March April May June July August September October November December;
%M=%[%A,3:4];
month=$(%M);
%M=%[%B,#$(month)] %[%A,5:6]/%[%A,1:2];
label -s -sa -d (.6*page.width) (.05*page.height) -n timestamp %M;

Consult Substring Notation in the LabTalk manual (page 14) for other options.



** Origin Tip **********************************************************
* Check to see if Origin uses a LabTalk script for a tool or menu: *
* (1) Open the Script window by selecting Window:Script Window *
* (2) Hold Down the Ctrl AND Shift Keys (just Ctrl for 4.x) *
* (3) Select the menu option you want to test *
* If the option runs a LabTalk script, that script types to the Script *
* window, but does not execute. *
* *
* You may see something like: *
* run.section(GRANALY,LowPass) *
* which opens the file named GRANALY.OGS and runs the script in the *
* [LowPass] section. *
************************************************************************
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000