Date formating

Highlighted
Six Stars

Date formating

Hello,

 

I have a column DTE_GEN_FILE (type String)

Exemple values :

06/07/2018 13:23:32
06/07/2018 13:23:33
06/07/2018 13:23:33
06/07/2018 13:23:47
06/07/2018 13:44:08
06/07/2018 13:45:07

 

I have parsed this String into Date with

TalendDate.parseDate("dd/MM/yyyy HH:mm:ss", row1.DTE_GEN_FILE)

But the output is :

06/07/18 13:23:32,000000000
06/07/18 13:23:33,000000000
06/07/18 13:23:47,000000000
06/07/18 13:44:08,000000000
06/07/18 13:45:07,000000000

How can I mask/delete the trailing zeros ?

 

Thanks

 


Accepted Solutions
Forteen Stars

Re: Date formating

@Mayot,configure your tMap in below way,you will get as required.

 

i believe your output date type format might have issue.Untitled.png

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Nine Stars

Re: Date formating

Have you configured the Date pattern as per your requirement which is "dd/MM/yyyy HH:mm:ss" also on your output component schema & where are you storing/displaying the output. The code looks good without any issues.

Forteen Stars

Re: Date formating

@Mayot,configure your tMap in below way,you will get as required.

 

i believe your output date type format might have issue.Untitled.png

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: Date formating

@Mayot,still do you have this issue?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Six Stars

Re: Date formating

No the problem is always here, but I don't care now, it's just esthetic my datas are good so I go on ^^.

I think this is a problem in the display settings in my DB software.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download