View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Keldair
 
Posts: n/a
Default Converting Julian Seconds with a macro to replace old seconds data

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?