Converting Julian Seconds with a macro to replace old seconds data

G

Guest

I have just recently converted an access database to excel and in the data is
some fields with the date/time stored as julian seconds. In access I used to
just use a macro to convert and display it on a form, but I can no longer do
that.

I just wish to convert the data to a mm/dd/yyyy format, but I am unsure how
to with excel.

This is the function.

Function JulianSecondsToDateTime(IngJulianSeconds As Long) As Date

'Julian Seconds plus 68 years to make compatible with Access
JulianSecondsToDateTime = DateAdd("yyyy", 68, CDate(IngJulianSeconds / 86400))

End Function

Is there a way to do so?
 
F

Fred Smith

One way to apply the same conversion as your Access function is:

=date(year(a1/86400)+68,month(a1/86400),day(a1/86400))

Does this help?
 
G

Guest

Yes that helps, thank you much.

Fred Smith said:
One way to apply the same conversion as your Access function is:

=date(year(a1/86400)+68,month(a1/86400),day(a1/86400))

Does this help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top