I have a start date and end date as input in a talend delimited file 12-08-2018 to 31-08-2020 I need to split this into month wise data

0 votes
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
Aug 17, 2020 in Talend by Sana
• 120 points

edited Aug 17, 2020 by Sana 1,087 views

1 answer to this question.

0 votes

Hey, @The TOPMOST,               

You need a routine with your date as a parameter and the number of months as a return. You can check this out for your reference https://www.datalytyx.com/how-to-split-a-file-based-on-a-date-value-using-talend-part-1/

Hope this was what you were looking for. 

Get your Talend certification today to become certified professional.

Thanks.

answered Aug 17, 2020 by Carlos
Hey, @Carlos thank you for replying. I referred to the above site but it is not helping.

If you can elaborate more specifically it would be helpful.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP