# Modified javascript to add more date in colums

**URL:** https://community.automationedge.com/t/modified-javascript-to-add-more-date-in-colums/4733
**Category:** Process Studio
**Created:** [September 8, 2021, 10:31am UTC](https://community.automationedge.com/t/modified-javascript-to-add-more-date-in-colums/4733 "2021-09-08T10:31:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![suyat13](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@suyat13](https://community.automationedge.com/u/suyat13)
#### Post date: [September 8, 2021, 10:31am UTC](https://community.automationedge.com/t/modified-javascript-to-add-more-date-in-colums/4733/1 "2021-09-08T10:31:36Z")

</div>

1. Create PolicyDetails file with multiple records having data as (PolicyNo, PolicyHolderName,  
PolicyDate,PolicyAmount ). Sample data is provided. Add 5 more records in these data.

![Capture](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/aa323abee2bd7d38517045b8d111755405f5e60e.jpeg)

1. Calculate 3 installment dates from PolicyDate using Modified Java script step

 First installment date should be within 3 days of PolicyDate.  
 Second installment date should be after 3 months of PolicyDate.  
 Third installment date should be after 6 months of PolicyDate.

1. Store all details along with installment dates in excel output file.

---

<div class="post-metadata">

### Author: ![KalyaniW](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@KalyaniW](https://community.automationedge.com/u/KalyaniW)
#### Post date: [September 13, 2021, 6:25am UTC](https://community.automationedge.com/t/modified-javascript-to-add-more-date-in-colums/4733/2 "2021-09-13T06:25:24Z")

</div>

Hello @suyat13

You can use Modified JavaScript step to calculate the installment date depending upon the conditions given.  
Lastly you can use Microsoft Excel Writer step to store the data in the output file.

---

<div class="post-metadata">

### Author: ![Akash\_N](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Akash\_N](https://community.automationedge.com/u/Akash_N)
#### Post date: [April 21, 2022, 12:51pm UTC](https://community.automationedge.com/t/modified-javascript-to-add-more-date-in-colums/4733/3 "2022-04-21T12:51:10Z")

</div>

Hi Suyat13  
You can use below logic in Modified JavaScript value plugin  
var First\_Installment=dateAdd(PolicyDate, “d”, 3);

var Second\_Installment=dateAdd(PolicyDate, “m”, 3);

var Third\_Installment=dateAdd(PolicyDate, “m”, 6);

Thank You
