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
 Date / time problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

annnewman

2 Posts

Posted - 01/23/2002 :  4:14:44 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I found the technical support item that describes how to combine date and time into one column, and I am using this worksheet 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;

My date is in the yyMMdd format.
My time is in the HH:mm:ss.### format.
When I have changed the data types for these
columns and run the above worksheet script,
I get 00:00 for the time for every entry in my date column. If I change subformat from 10 to 14 (for yyMMdd HH:mm:ss which is the closest selection to what I really want:
yyMMdd HH:mm:ss.###) I still get the time part of the date column containing 00:00:00 for all entries in the column. Nothing plots correctly.

Anyone know what am I doing wrong?

greg

USA
1378 Posts

Posted - 01/24/2002 :  11:44:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I suspect that your Time column is actually Text. Just because it displays in a column like time, doesn't mean Origin is treating it as Time.

Before running your script, either

  1. Select the 'Time' column and choose Format : Column. Change the Display to 'Time' and change the Format to 'HH:mm:ss.###'
  2. You can do the same thing in script:


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



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