Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
So im trying to transform data using a Tmap. Im struggling with my last column.
My input looks like : 10.03.2020 14:52:33 (so dd.MM.yyyy HH:mm:ss)
I need the output to be : 20200310145233 (so yyyyMMddHHmmss)
I believe its coming in as a string format. I tried to use formatdate but encounter exception. So i did handle it with stringhandling but got caught.
I did use .replace to delete : / space and . like that : row1.date == null || row.date.equals("") ? "error":row1.date.replace(".","")
.replace(" ","").replace(":","")
So im getting ddMMyyyyHHmmss and i tried to substring all but i cant find a way.
Any help ? If you use formatdate please remind its a string input and i will need some type clarification since i didnt find first
Thanks a lot
Hi @Bourgin Benoit ,
You could use TalendDate.parseDate() function in talend get the required output.
Please go through below url for type conversion.
http://talendhowto.com/2017/08/29/convert-between-different-datatypes/
Please mark as solution if it helps.
Hi @Bourgin Benoit ,
You could use TalendDate.parseDate() function in talend get the required output.
Please go through below url for type conversion.
http://talendhowto.com/2017/08/29/convert-between-different-datatypes/
Please mark as solution if it helps.