Perl - Create date range looking at 3 fields
- by cgmojoco
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