Date formating

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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch