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 for Programming
 Forum for Origin C
 Julian Day in Origin

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
newuser_ca Posted - 07/26/2012 : 2:15:55 PM
OriginPro 8.6 in Win7

I have a dataset contains Julian Day value as "Date" column. But when I import and convert the date, I have 12-hour offset in Origin.

I noticed that the Julian Day value in Origin is not the same as I got from wiki.
Example: Julian Day Value = 2456135
I use the following codes in Origin to conver to string:
double jd = 2456135;
out_str(get_date_str(jd, LDF_SHORT_AND_HHMM_SEPARCOLON));


The result I got in Origin is: "7/27/2012 00:00"

I used some converters in the Internet, I got "2012 July 26 12:00:00". There is a 12-hour difference.

I searched in the Internet. The Julian Day in wiki is 12h Jan 1, 4713 BC (http://en.wikipedia.org/wiki/Julian_day)

It seems to me that the Julian Day value in Origin counts from 0h instead of 12h.

Is this a bug in Origin or is it set as this way?

Thanks.
4   L A T E S T    R E P L I E S    (Newest First)
newuser_ca Posted - 08/02/2012 : 3:54:51 PM
Thanks for the explanation.

That is clear now.
greg Posted - 08/01/2012 : 11:09:54 AM
All our help files clearly state the relation between Origin's Julian Day numbers and the standard Astronomical Julian Day value:

http://www.originlab.com/www/helponline/Origin/en/UserGuide/Dates_and_Times_in_Origin.html

http://www.originlab.com/www/support/resultstech.aspx?ID=295&language=English&Version=7.5

http://wiki.originlab.com/~originla/howto/index.php?title=QuickHelp:What_is_the_difference_between_the_underlying_mathematical_system

In fact, other non-astronomical software similarly start their days at midnight whether they use the Julian base as Origin does or one of Excels two date systems or Posix (Unix) time.
newuser_ca Posted - 07/27/2012 : 09:40:30 AM
But this is not the definition of Julian Day.
Julian Day is defined as "12h Jan 1, 4713 BC".

Anyway, I will convert it by myself.
Penn Posted - 07/27/2012 : 01:54:57 AM
Hi,

Actually, Origin uses a 12 hour offset in order to have 0 hours coincide with midnight. So, the result should be correct.

Penn

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