+ Reply to Thread
Results 1 to 3 of 3

datepicker on 1904 date spreadsheet

  1. #1
    Basil
    Guest

    datepicker on 1904 date spreadsheet

    Hiya,

    I am using a datetime picker from a userform and on change I populate a cell
    on a spreadsheet which is using the 1904 date system (this is because it
    needs to be able to view negative times).

    The problem is that when the date is transferred from the date picker to the
    spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
    way of changing the date picker / VB times so that they are in the 1904
    system?

    Thanks,

    Basil

  2. #2
    Dave Peterson
    Guest

    Re: datepicker on 1904 date spreadsheet

    Maybe just subtract 1462 before you assign the value to the cell?

    Basil wrote:
    >
    > Hiya,
    >
    > I am using a datetime picker from a userform and on change I populate a cell
    > on a spreadsheet which is using the 1904 date system (this is because it
    > needs to be able to view negative times).
    >
    > The problem is that when the date is transferred from the date picker to the
    > spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
    > way of changing the date picker / VB times so that they are in the 1904
    > system?
    >
    > Thanks,
    >
    > Basil


    --

    Dave Peterson

  3. #3
    Basil
    Guest

    Re: datepicker on 1904 date spreadsheet

    Thanks Dave,

    I actually tried that and it was subtracting 8 years instead of 4! At that
    point I realised that I needed to add '.Value' after my object name to make
    the spreadsheet undertsand the correct date. A bit of a weird one, but sorted
    now.

    Thanks for looking into it mate.

    Basil

    "Dave Peterson" wrote:

    > Maybe just subtract 1462 before you assign the value to the cell?
    >
    > Basil wrote:
    > >
    > > Hiya,
    > >
    > > I am using a datetime picker from a userform and on change I populate a cell
    > > on a spreadsheet which is using the 1904 date system (this is because it
    > > needs to be able to view negative times).
    > >
    > > The problem is that when the date is transferred from the date picker to the
    > > spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
    > > way of changing the date picker / VB times so that they are in the 1904
    > > system?
    > >
    > > Thanks,
    > >
    > > Basil

    >
    > --
    >
    > Dave Peterson
    >


+ 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