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
 All Forums
 Origin Forum
 Origin Forum
 Script execution

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Catilina Posted - 01/06/2004 : 05:05:12 AM
Hi,

I have a worksheet with the date in one column and the time in another column. How do I combine both datasets into one column?

I'm using Origin 6.1.
In the knowledge database I've found a script:

getn
(Column number for date: ) date
(Column number for time: ) time
(Get column numbers);
wcol(date)+=wcol(time);
wks.col$(date).format=4;
wks.col$(date).subformat=10;

But it doesn't work. The error messages are:

Syntax Error on GETNUMBER command!
Usage: open getnumber (text1) var1 (text2) var2 .. (title)

WCOL(DATE)+=wcol(time) is a built-in function that can not be renamed

Does anybody know what's wrong?

Thanks, Catilina
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 01/06/2004 : 4:02:57 PM
That error will result when the date and time variables are not defined or are defined incorrectly. They should be the column numbers of the date and time columns. You are supposed to enter them in getn dialog. If column 1 has the dates and column 2 has the times you can skip the getn dialog like this...

date=1;
time=2;
wcol(date)+=wcol(time);
wks.col$(date).format=4;
wks.col$(date).subformat=10;

Mike Buess
Origin WebRing Member
Catilina Posted - 01/06/2004 : 10:24:27 AM
Thanks Mike,

The first error message disappears, but the second still remains.
What else can I do?

Sabine
Mike Buess Posted - 01/06/2004 : 08:44:17 AM
Hi Catilina,

The syntax error suggests that you are executing the getn command one line at a time from the script window. Instead you should highlight the entire script and then press Enter.

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000