Results 1 to 2 of 2

Thread: Day diffrence between two records

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Wellington, NZ
    Posts
    267

    Day diffrence between two records

    Hi

    I am populating a ListView, in the following loop...

    Do Until .GotLastRow()
    Loop

    On each row, I have a date column. I would like to add another column which shows the number of days between one row and the next row. I would also have to avoid the error which would probably happen at the final row - there won't be a "next".

    Thanks
    Robert

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Day diffrence between two records

    RobertLees,

    Simple read each row and fill two data items with the date. You alternate between then using a counter that will alternate between 1 and 2. When the counter is two you calculate the date using The DateDiff Function.

Posting Permissions

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



Click Here to Expand Forum to Full Width