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
 date() function giving wrong result in worksheet

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
joe_heaven Posted - 10/22/2003 : 09:43:57 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 10/24/2003 : 3:49:38 PM
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.



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