tags:

views:

130

answers:

1

I have 3 Columns of data:

Item    |   CreateDate  | Version | 
ABC  |     1/1/2010  |  X      |
ABC  |     3/15/2010 |  XB     |
BBB  |     2/15/2010 |  X      |
BBB  |     6/15/2010 |  X      |

How might I populate two additional columns of data named Version Start & Version End that would calculate the start date of the version and the end date of the version for a given Item...based on the CreateDates.

Item    |   CreateDate  | Version   |   Version Start   |   Version End
ABC  |     1/1/2010  |  X        |     1/1/2010      |    3/14/2010
ABC  |     3/15/2010 |  XB       |     3/15/2010     |    (04/29/2010)Today
BBB  |     2/15/2010 |  X        |     2/15/2010     |    (04/29/2010)Today  
BBB  |     6/15/2010 |  X        |     2/15/2010     |    (04/29/2010)Today  
A: 

You can use Date::Calc's Add_Delta_Days function to determine the Version End date, assuming it is a certain number of days after the Version Start date.

Narthring