+ Reply to Thread
Results 1 to 3 of 3

Adding an array of Dates to an Array of Times.

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Hillsboro, OR
    MS-Off Ver
    Excel 2003
    Posts
    14

    Red face Adding an array of Dates to an Array of Times.

    I have a table that I am storing into two arrays.
    One array, FDate,stores a date and another array, FTime, where I store times.

    FDate is formatted as m/dd/yyyy Hh:Mm:Ss
    Ftime is formatted as Hh:Mm:Ss

    I know in excel that you can add and subtract dates and times. How do you accomplish the same task in VBA?

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Adding an array of Dates to an Array of Times.

    Format does not equal value. Use cdbl(). e.g.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    276

    Re: Adding an array of Dates to an Array of Times.

    Depending on the type of values stored in FDate and Ftime the answer to this question will varry, but it could be generally done by

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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