Hi Team,
Need to generate the Max Date in script from below table by creating the new field on the basis of resource wise Min Date.
Input table
Resource | Min Date(dd/mm/yyyy) | Program |
---|
R1 | 1/07/2018 | P1 |
R1 | 8/07/2018 | P2 |
R1 | 10/08/2018 | P3 |
P2 | 02/08/2018 | P1 |
S1 | 03/07/2018 | P2 |
S1 | 03/07/2018 | P3 |
Output table
Creating max field with 1.
peek () -1 i.e 2nd date minus 1 day and
2. if resource no next record then add 3 months to it I. E. R1 with 10/08/2018 is last record that's y we add 3 months to it .
3. If resource with same min date dn add 3 month's to both of it as done for S1
Resource | Min Date(dd/mm/yyyy) | Program | Max date |
---|
R1 | 1/07/2018 | P1 | 7/07/2018 |
R1 | 8/07/2018 | P2 | 4/08/2018 |
R1 | 5/08/2018 | P4 | 9/08/2018 |
R1 | 10/08/2018 | P3 | 10/11/2018 |
W2 | 02/08/2018 | P1 | 02/11/2018 |
S1 | 03/07/2018 | P2 | 03/10/2018 |
S1 | 03/07/2018 | P3 | 03/10/2018 |
Hopefully i'm able explain it ..after this i need to incorporate calendar with interval match min max date .
Thanks in Advance!