Perl - Create date range looking at 3 fields
Posted
by cgmojoco
on Stack Overflow
See other posts from Stack Overflow
or by cgmojoco
Published on 2010-04-29T17:51:51Z
Indexed on
2010/04/29
17:57 UTC
Read the original article
Hit count: 289
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
© Stack Overflow or respective owner