Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
TalendDate.addDate(row2.nxt_date,"dd/MM/yyyy",row4.repeatations,"MM")
Hello, I'm a beginner on Talend.
I have a little the same problem, but I did not manage to adapt your answers to my situation.
I was wondering if it was possible to create a new variable that displays all the dates for the current month.
Let me explain. I would like, starting from nothing, to create a new variable on talend which takes into account the day that it is at the time of its execution.
And that displays every day of the month. (Which takes into account the months of 30 or 31 days as well as the month of February).
I succeeded using the tjava tool to create an ArrayList which contains the values I want to obtain. But however, I don't see how I can use it afterwards. Because I would like to have a variable that I can then use in a tmap or each line corresponds to a different day.
I do not know if I am very clear. Do not hesitate to ask questions if this is not the case.
Thank you for your answers.
Sorry for my English
Hello,
I created a calendar table by following this tutorial:
It's an old post, but still usefull (at least for me)
In your tJavaRow You can manipulate the dates to your liking, for example :
output_row.dayOfYear = new Integer(cal.get(Calendar.DAY_OF_YEAR)); output_row.isFirstDayOfMonth = new Integer(1).equals(output_row.day); output_row.isLastDayOfMonth = output_row.day.equals(cal.getActualMaximum(Calendar.DATE)); output_row.numWeek = cal.get(Calendar.WEEK_OF_YEAR);
See if you can combine this with the solution provided by @mathurm .
If you find the solution, it would be nice to come and share it with us, it could help other people...
Regards,
PS : i found another tutorial for calendar :diethardsteiner's tutorial