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() function giving wrong result in worksheet
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

joe_heaven

Germany
7 Posts

Posted - 10/22/2003 :  09:43:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi all,

trying "type $(date(2003-10-16 16:43:25)+1.5,D10);" in a script-window in Origin 7G_SR4(B552) on W2K gives the correct result: "2003-10-18 04:43:25" (of course depending on the settings regarding date/time-display).

If I try the same "date(2003-10-16 16:43:25)+1.5" as a "calculate column"-command in a worksheet it just puts "2003-10-23 12:00:00" which is the current date (without correct time!).

Any suggestions? I need this urgently to convert a timeseries with seconds since start into an absolute time scale.

Waiting for your help ....
Jochen

greg

USA
1379 Posts

Posted - 10/24/2003 :  3:49:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This appears to be a peculiar bug in the Set Column Values routine, since the exact same command works from the script window. In a rather bizarre workaround, you can juggle the expression into this form:

date(10/16/2003) + 1.5 + 16/24 + 43/(24*60) + 25/(24*60*60)

which for your date format should be:

date(2003-10-16) + 1.5 + 16/24 + 43/(24*60) + 25/(24*60*60)
or
date(2003-10-16) + 1.5 + (16*60*60+43*60+25)/(24*60*60)

and it works.


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