Anyone have an Excel formula to convert JD to UTC date and time?
..geo
Printable View
Anyone have an Excel formula to convert JD to UTC date and time?
..geo
George, I think I have something you can use - I just can't get to it from where I am at work. I'll reply again later today.
Hi George,
Sorry, what I was thinking of turned out to be a routine I use for correcting geocentric times of minima to heliocentric times, not converting JD to UTC. I had built a function to do this and put in inside a code module to make it available.
If you can link to ACP, there are several Util. methods that do this conversions, but that probably doesn't help.
USNO has an online converter at http://aa.usno.navy.mil/data/docs/JulianDate.php, but that probably doesn't help either.
Here's a website that may work for you: http://www.csgnetwork.com/julianmodifdateconv.html
If you view the source of this page, or the source of the "TJD" page it points to, the javascript is visible in the page and reusable. I'm not sure you can actually get to a one-line expression for the conversion that you can use, but you ought to be able to use the code (converted to VBScript) to script a function you can embed in a spreadsheet module and then call the function for any cell's JD.
George, you can use ACP's served objects from Excel. Alt-F11 to get to the VBA workspace. Create a new function
I think this is the right way to apply an hours offset to VB Date objects (which are fractional days). Now use this new function in your formula(s). If you're going to use it a lot, create the Util in the function that gets called when the spreadsheet is opened and save it globally (Set Util = CreateObject("ACP.Util") at startup, etc. Then the above function would just be the last line.Code:Function JD_UTC(JD as Double) As Date
Dim Util
Set Util = CreateObject("ACP.Util")
' Nonsense below converts returned local Date to UTC via offset in hours
JD_UTC = CDate(CDbl(Util.Julian_Date()) + (Util.SysUTCOffset / 24.0)) ' Yes plus not minus, see ACP docs on SysUTCOffset
End Function
Thanks Bob and Dick. I found exactly what I was looking for at the Variable Star South webpage Info and Resources page. Two very useful and well done spreadsheets.
http://www.variablestarssouth.org/in...-a-calculators
..george
George,
Wow, the converter - 6th item on the list at your reference website - is astonishingly innovative and simple - just a matter of the formatting of the cells. Nothing more. No fancy calculations there.
Yeah! I get to "Rococo" in my approach to such things. Then you see that and say, "Well, of course!"