2.1.13 Dates and Times in Origin
Origin interprets dates based upon the Gregorian Calendar. Time is interpreted in hours:minutes:seconds. Origin supports the following date ranges:
- When entering four digits for the year, Origin supports a date range of:
- 1/1/0100 to 12/31/9999.
- When entering two digits for the year, Origin supports a date range of:
- 0 to 44 = 2000 to 2044
- 45 to 99 = 1945 to 1999
Origin's Mathematical System for Date and Time
Origin's mathematical system for date and time is based on the astronomical Julian Day, which defines January 1, -4712 (January 1, 4713 BCE), 12 hours Greenwich Mean Time as "time zero" (t0). However, Origin's system differs in employing a 12 hour offset (see next).
Origin's Default System: Adjusted Julian Date
Origin's long-time, default date-time system establishes t0 as January 1, 4713 BCE (January 1, 4713 24:00:00 BCE or January 2, 4713 00:00:00 BCE) -- 12 hours later than the standard Julian t0 value.
In this system, Origin interprets a calendar date+time of ...
- 11 June 1998 at 21:23:01
... as a date value of ...
To obtain a true astronomical Julian Date value, you must add 0.5 to Origin's value (0.5 days = 12 hours), yielding a value of 2450976.390984.
No assumptions are made about time zones or any time shifting scheme (such as Daylight Savings).
Alternate Date-Time Systems in Origin
Starting with Origin 2019, Origin offers two alternate date-time systems - a true Julian Date system and a "2018" system in which t0 is defined as January 1, 2018 at 00:00, allowing for more precise handling of fractional seconds.
To use one of these alternate systems you have to change the value of System Variable @DSP. Further, this value is saved into the project and therefore you must set a value for every project in which you wish to use an alternate date-time system.
| Value of @DSP
|| Calendar Date
|| Origin’s long-time default (True Julian Date – 0.5)
|| True Julian Date
|| t0 = Jan 1 2018 00:00
Origin's "2018" system allows for greater numeric precision when working with measurements made to fractions of a second. When working with contemporary dates, calculations involving measurements to 10-8 seconds can be supported.
To choose an alternate default date-time system for your Origin software:
- Run Origin and from the main menu, choose Window: Script Window (Shift+Alt+3).
- In the Script Window, type the following (choosing a value from the above table), the press Enter.
@DSP supports three options
- 0 = Origin's long-time adjusted Julian Day system with "zero" at midnight on January 1, 4713 BCE (12 hours later than true Julian Day).
- 1 = True Julian Day ("zero" is January 1, 4713, BCE at 12:00 GMT).
- 2018 = 2018 date system, where "zero" is Jan 1 2018 00:00.
|Note: When @DSP is set as 1 and you want to display date data as time, we suggest set the Column Properties as shown below. Otherwise there will be offset of 12 hours.
Converting Between Unix Timestamp and Julian Date
Depending on your version of Origin, there are a couple of ways to convert between a Unix timestamp and a Julian Date: