Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Can any one help me to solve this issue? I have as an output an excel file with a date with this format: 01.05.2015 (dd/MM/yyyy) I'd like to have as an output, a date in a Date type with this format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
This is what I typed in my tMap: (row10.CREATED!=null)?TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",row10.CREATED):null and unfortunately it gave me as an ouput: Thu Apr 14 00:00:00 CEST 2016
I tried to use a TalendDate.formatDate but it didn't work.
I'd appreciate any help, thanks in advance
Regards,
Stvn
Hi again,
I convert the file into csv files and all dates are formated 14.04.2016. I Strutured my Job as shown below:
When I run the Job without the second tMap I can see my dates results. When I add the second tMap where I tried to convert in a dateFormat, It gives me an error. You can see bellow the result from my last running. Dates are formatted in this way:
|31.07.2006
|31.07.2006
|31.07.2006
|31.07.2006
Is there any way to format all dates in a tJavaRow?
Warm Regards,
thank you for your time
Steve
Hi,
You will find as an attachment a copy of my excel sheet to test. Thank you in advance
H Steve,
Thanks for the sample file and it really helped to identify the issue. I have used them to transform the data and I was able to print them successfully. The most important change was to read the input data in Date format itself so that we will not face the change in format issue later.
Please refer the screen shots below.
Now, the input schema for excel is as shown below.
tMap screenshot as shown below.
the tMap functions are as shown below.
Relational.ISNULL(row1.DATE)?null: TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",TalendDate.formatDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",row1.DATE)) Relational.ISNULL(row1.DATE_2)?null: TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",TalendDate.formatDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",row1.DATE_2))
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Could you please mark the topic as resolved so that it will help other community members also during reference?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂