Converts fractional Julian date series to a datetime series.
DATE2DT(juldate)
(date, time) = DATE2DT(juldate)
juldate |
- |
A scalar or series, the fractional Julian date values. |
A series or array of datetime values.
(date, time) = DATE2DT(juldate) returns the date and time components in separate variables.
W1: date2dt(2462806.0)
W1 contains the datetime:
10/31/2030 12:00:00
The time is 12:00:00 because fractional Julian dates begin at 12:00 noon UTC time.
W1: {2462806.75}
W2: date2dt(w1)
W3: (d, t) = date2dt(w1);ravel(d, t)
W4: {w1, d, floor(w1 + 0.5)};setvunits("Days")
The fractional Julian date value in W1 is 2462806.75.
W2 indicates the fractional Julian date represents the date time:
11/01/2030 06:00:00
Variable d in W3 contains the date time integer Julian value 2462807, the Julian day starting at midnight.
Variable t contains 21600 or 6:00:00, the date time seconds since midnight. The two variables d and t represent the date time:
11/01/2030 06:00:00
W4 displays the original fractional Julian date, the integer Julian date and the integer Julian date derived from the fractional Julian date. The integer Julian date starting at midnight is obtained from the fractional Julian date starting at noon with:
i_jul = FLOOR(f_jul + 0.5)
The fractional Julian date starting at noon and integer Julian date starting at midnight plus elapsed seconds since midnight represent the same calendar date.
W1: {2462805.25,
2462805.50,
2462805.75,
2462806.00,
2462806.25,
2462806.50,
2462806.75,
2462807.00}
W2: date2dt(w1)
W1 contains a series of fractional Julian date values.
W2 converts the fractional Julian date values to a column of integer Julian date values and a column of seconds starting at midnight.
W2 contains the datetimes:
10/30/2030 18:00:00
10/31/2030 00:00:00
10/31/2030 06:00:00
10/31/2030 12:00:00
10/31/2030 18:00:00
11/01/2030 00:00:00
11/01/2030 06:00:00
11/01/2030 12:00:00
W1: {2462805.25,
2462805.50,
2462805.75,
2462806.00,
2462806.25,
2462806.50,
2462806.75,
2462807.00}
W2: date2dt(w1)
W3: dt2date(w2)
W4: w1 == w3
Same as above, except W3 converts the datetime values in W2 back to fractional Julian days.
W4 is all ones indicating the transformation from and to fractional Julian days is successful and invertible.
DATE2DT converts fractional or astronomical Julian date values to datetime values.
A datetime series consists of 2 columns of values where the first column contains integer Julian dates starting at midnight and the second column contains time in seconds starting from midnight.
A fractional Julian day is a real-valued count of days since January 1, 4713 BCE at noon UTC. The integer part represents the number of full days elapsed, while the fractional part represents the time of day, measured from noon, not midnight. For example, a fraction of 0.25 represents time 18:00:00 or 6 hours (one quarter of a day) after noon. The noon-based convention avoids discontinuities in astronomical observations that span midnight.
See DT2DATE to convert datetime values to fractional Julian date values.
See DT2YMDHMS to convert a date time series to series of years, months, days, hours, minutes and seconds.