Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Karuetl
Creator II
Creator II

Looping every month

I want to loop every month  with start_date as start date of the month and end_Date as End date of the month 

 

Once loaded then it has to go previous month dates and keep going back so that i can load every month data into the table

Labels (1)
  • v7.x

1 Reply
Anonymous
Not applicable

Hi,

 

   If you want to create new records based on two date values, you can achieve them in following steps.

 

a) Identify the number of records by calculating the difference between start date and end date using TalendDate.diffDate function and store the value to a context variable.

b) Use add date function TalendDate.addDate(start_date,i,"DD") where i need to iterate from 0 to context variable value. You can also use tRowgnerator to create these dummy records.

 

Try it out first and if you are stuck with logic, you can come back and I will be happy to help 🙂 Please add your job screen shots with error area details if you are having any issues.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved