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 for Programming
 Forum for Origin C
 Julian Day in Origin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

newuser_ca

70 Posts

Posted - 07/26/2012 :  2:15:55 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

Penn

China
644 Posts

Posted - 07/27/2012 :  01:54:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

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

Penn
Go to Top of Page

newuser_ca

70 Posts

Posted - 07/27/2012 :  09:40:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

greg

USA
1378 Posts

Posted - 08/01/2012 :  11:09:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

newuser_ca

70 Posts

Posted - 08/02/2012 :  3:54:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the explanation.

That is clear now.
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