Link to home
Start Free TrialLog in
Avatar of 1469
1469

asked on

Julian date to a format dd/mm/yyyy

Hello,
I have a formula to obtain the Julian date that is the follow:

a=(14-month)/12
y = year + 4800 - a
m = month + 12a - 3

JD = day + (153m +23)/5 + 365y + y/4 - 32045

Has anyone used this function before¿?

And now to obtain the function that converts a date julian to string format normal date¿?
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

what programming language are you using?  

subtract 2451700 (which is the JD for Jan 1, 2000) from the JD that you want to convert, and then add (or subtract as the case may be) that many days from Jan 1, 2000 to get the date the corresponds to the JD that you have.

AW
Avatar of 1469
1469

ASKER

VB
You have asked this precise question elsewhere (Math & Science), and that violates the EE rule about offering more than 500 points TOTAL for a question.  You have also accepted the answer provided in the other question, so there seems to be very little to be served by offereing an answer here.

To get the Current Date from a give JD, in VB or VBA:

Dim strCurentDate as string
 
strCurrentDate = Format(DateAdd("d", JD - 2451700, #Jan 1, 2000#), "MMM dd, YYYY")
You might be able to get both questions cut down to 250 points each.  I for one am interested in both the programming angle and the historical angle.
ASKER CERTIFIED SOLUTION
Avatar of Ralf Klatt
Ralf Klatt
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial