Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend Coummunity,
Could you please help me on writing code for the below two date conversions in tMap. Please find the attached screen shot too.
1) From Current Date (System Date) to dd-MONTH-yy Format:
Output needed: 29-MAY-19 (Target it Oracle and Data type is 'Date')
2) Date conversion from SQL Server (Source) to Oracle (Target - Data type is 'Date')
From one of the column in SQL Server table (SSMS) date is populated as 2019-05-29 09:16:06.0000000.
I need to bring / convert this date into dd-MONTH-yy Format.
Output needed: 29-MAY-19
Your help is greatly appreciated.
Thanks in advance.
Kumar
Hi,
The issue says that job is failing due to unparseable date format. This means the input date values of one of the three columns are having date in different format compared to what you have given there.
If you are expecting null values for the date, I would recommend to add additional null check condition also for these columns.
I hope the answer has helped to resolve your original and current issue. Please spare a second to mark the topic as resolved as it is the best way to thank the Talend community members for sparing their time in between normal work for the queries 🙂
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 🙂
Please try the below steps
The functions used are:-
current date -> TalendDate.getCurrentDate() output_date -> TalendDate.parseDate("yyyy-MM-dd HH:mm:ss.SSSSSSS",row1.input)
Note:- If you want to limit the month part to three characters, please use "dd-MMM-yy" instead of "dd-MMMM-yy" in the output flow.
Hope I have answered your query. Please spare a second to mark the topic as resolved 🙂
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 🙂
Hi Nikhil,
I knew you are always be available for rescue and thank you for the reply.
Could you please take a look at the tmap attachment and let me know what is missing?
Below is the error am getting:
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "Edit"
Thank you
Kumar
Hi,
The issue says that job is failing due to unparseable date format. This means the input date values of one of the three columns are having date in different format compared to what you have given there.
If you are expecting null values for the date, I would recommend to add additional null check condition also for these columns.
I hope the answer has helped to resolve your original and current issue. Please spare a second to mark the topic as resolved as it is the best way to thank the Talend community members for sparing their time in between normal work for the queries 🙂
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 🙂