I have an input file delimited with 1-row data as following-
start_date,end_date,charge
12-08-2018,31-8-2020,100
I need such output
start_date,end_date,charge
12-08-2018,31-08-2018,60
01-09-2018,30-09-2018,100
01-10-2018,31-10-2018,100
01-11-2018,30-11-2018,100
...... Till 01-08-2020,31-08-2020,100
As in first data the date starts from 12 Aug so the charge will not be applied for the full month rather, it will be = (30-12)/30 * 100
for next month the data is for 30 days per month so the charge will be 100 only
Please help me to resolve this