+ Reply to Thread
Results 1 to 3 of 3

Converting Julian Seconds with a macro to replace old seconds data

  1. #1
    Keldair
    Guest

    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?

  2. #2
    Fred Smith
    Guest

    Re: Converting Julian Seconds with a macro to replace old seconds data

    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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    Keldair
    Guest

    Re: Converting Julian Seconds with a macro to replace old seconds

    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" <[email protected]> wrote in message
    > news:[email protected]...
    > >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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1