Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
daez
Creator
Creator

Data handling using TMAP

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

Labels (2)
1 Solution

Accepted Solutions
vikramk
Creator II
Creator II

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.

 

View solution in original post

1 Reply
vikramk
Creator II
Creator II

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.