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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Twelve 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
4 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.

Twelve 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
Twelve Stars

Re: Date formating

@Mayot,still do you have this issue?

Manohar B
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.