There's a calculation for making this conversion at
http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html that seems to work for
julian dates like 2430705 (Dec 11, 1942). The JD you provide though (100033)
doesn't sync with the computation though, but I'm assuming there's some
factor missing you may be able to figure out.
Something like this:
private DateTime JulianToDateTim e(double julianDate)
{
DateTime date;
double Z, W, X, A, B, C, D, E, F;
int day, month, year;
try
{
Z = Math.Floor(juli anDate + 0.5);
W = Math.Floor((Z - 1867216.25) / 36524.25);
X = Math.Floor(W / 4);
A = Z + 1 + W - X;
B = A + 1524;
C = Math.Floor((B - 122.1) / 365.25);
D = Math.Floor(365. 25 * C);
E = Math.Floor((B - D) / 30.6001);
F = Math.Floor(30.6 001 * E);
day = Convert.ToInt32 (B - D - F);
if (E > 13)
{
month = Convert.ToInt32 (E - 13);
}
else
{
month = Convert.ToInt32 (E - 1);
}
if ((month == 1) || (month == 2))
{
year = Convert.ToInt32 (C - 4715);
}
else
{
year = Convert.ToInt32 (C - 4716);
}
date = new DateTime(year, month, day);
return date;
}
catch (ArgumentOutOfR angeException ex)
{
System.Windows. Forms.MessageBo x.Show("Julian date could not be
converted:\n" + ex.Message, "Conversion Error",
System.Windows. Forms.MessageBo xButtons.OK,
System.Windows. Forms.MessageBo xIcon.Error);
date = new DateTime(0);
}
catch (Exception ex)
{
System.Windows. Forms.MessageBo x.Show("Error converting Julian date:\n" +
ex.Message, "Conversion Error", System.Windows. Forms.MessageBo xButtons.OK,
System.Windows. Forms.MessageBo xIcon.Error);
date = new DateTime(0);
}
return date;
}
-- Nick