Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

timestamp format

Hello everyone,

 

I'm using talend open studio data integration and new to this tool.

I have a csv file that has timestamp column and i'm trying to convert this in the schema of the input delimted_file. and I get the below error.

 

Couldn't parse value for column 'Tx_Timestamp' in 'row1', value is '07-JUL-18 05.17.36.000 PM -05:00'. Details: java.lang.RuntimeException: Unparseable date: "07-JUL-18 05.17.36.000 PM -05:00"

 

I tried this various options like "dd-MMM-yy HH.ms.ss.SSS a  Z" but nothing helped.

 

Please let me know.

 

 

Labels (4)
6 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Are you looking for the following output?

 

 0683p000009LzPD.png

Regards,

Anonymous
Not applicable
Author

Yes this is exactly the output I need . so I need to us this following below to convert it?

 

TalendDate.ParseDateinUTC ( )

 

and I won't be able to use this in the FileInput_Delimted . under edit schema? Correct?

 

I can use it in tmap in expression editor and use that as a separate column/variable?

 

Thanks!

Anonymous
Not applicable
Author

Hi bro!

When I have to convert a TimeStamp field to a DateTime field, I like to create a routine in Talend for these purpose, and I'm going to show you how with a simple example where I've got a .csv input with a TimeStamp in milliseconds connected to tMap and the tMap output to a .csv output where I'm going to have two fields, the old timestamp and his correspondent DateTime.

 

0683p000009LzQQ.jpg-> This is the .CSV file input

 

 

 

 

0683p000009LzLp.jpg

Now I'm going to show you the talend routine to convert timestamp in milliseconds to datetime ("dd:mm:YY HH.mm.ss.SSS")

 

0683p000009LzQf.jpg

 

In the next step, you only have to aplpy the created routine in the tMap output option, expression builder! 0683p000009MACn.png

 

0683p000009LyrR.jpg

Now just Run the job and woalah! \(^.^)/

 

0683p000009LzDg.jpg-> .CSV file output

 

Pls, give me some Kudos if my response help you 0683p000009MACJ.png

Thanks for your time and attention ❤️

 

 

Anonymous
Not applicable
Author

Hi,

 

I have a date format in the below form in the csv file. how can I convert this?

2015-01-01T05:00:00Z

or what is the expression used I can store in the proper format?

 

Please help

 

vboppudi
Partner - Creator III
Partner - Creator III

Hi,

 

Please try below.

TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss'Z'","2015-01-01T05:00:00Z"

Regards,

 

 

Anonymous
Not applicable
Author

thanks for the quick one... 0683p000009MACn.png