Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? -- Regards, Fred "Keldair" wrote in message ... 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? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes that helps, thank you much.
"Fred Smith" wrote: 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? -- Regards, Fred "Keldair" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions | |||
importing data using a macro | Excel Discussion (Misc queries) | |||
import data with macro | Excel Discussion (Misc queries) | |||
import data using macro | Excel Discussion (Misc queries) |