Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
merouan
Contributor
Contributor

[resolved] convert bigdecimal yyyymmdd(20110701) to date (yyyy-mm-dd)2011-07-01

hi,
is there a way to convert bigdecimal yyyymmdd(20110701) format to data format like this (yyyy-mm-dd)2011-07-01, using tmap componement?
Thanks for help
Labels (2)
3 Replies
Anonymous
Not applicable

Hi
Welcome to Talend Community!
The expression may be a little complex but works fine.
TalendDate.parseDate("yyyy-MM-dd",TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("yyyyMMdd",row1.newColumn.toString())))

Regards,
Pedro
Anonymous
Not applicable

Hi,
I have also faced same problem to convert the bigdecimal into date format.
i have executed the provided code in tmap component, but unfortunately it doesn't work and i have got the below error "Exception in component tRowGenerator_1".
Please help us
Thanks in advance
Siva
alevy
Specialist
Specialist

Create a new topic and give full details of the exception. What type is it? What line of code triggers it? Screenprint your job and settings too.