Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I’m Alessio Ramundo and I’m a student of the University of Calabria (Italy). I found a problem with the component tmap. When I choose the function getpartofdate, in the section ‘expression’ I can choose ‘month’,’year’ or other as documentation. But if I would the semester or the quarter, is there a solution for this? I tried to write ‘SEMESTER’ or ‘QUARTER’ but it doesn’t work. I have only 0.
thank you very much for the attention.
Hi Alessio,
Unfortunately there aren't SEMESTER and QUARTER expressions for the getPartOfDate method, but you can achieve the same result by doing a division over the MONTH expression result:
QUARTER: (TalendDate.getPartOfDate("MONTH", input_date))/3+1 //add one at the end to start at quarter 1 instead of 0
SEMESTER: (TalendDate.getPartOfDate("MONTH", input_date))/6+1 //add one at the end to start at semester 1 instead of 0
I hope it helps.
Best regards,
Anselmo