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¿?
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¿?
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")
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.
https://www.experts-exchange.com/questions/21804588/Repeat-question.html
(The other one hasn't been accepted yet)
(The other one hasn't been accepted yet)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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