Hi, I have a problem in a tMap. I read a RSS feed with pubdate in GMT or CEST Time. My colum table is a DATETIME type. 1. How to convert GMT to DATETIME ? 2. CEST is not read by tRSSInput. So, How to insert datetime.now if pubdate is empty ? Thanks in advance. Regards
Thanks but there is a bug afer few lines :
Exception in component tMap_3
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "26 Aug 2011 08:06:00"
at routines.TalendDate.parseDate(TalendDate.java:503)
at mediascit.recupflux_0_1.RecupFlux.tMysqlInput_6Process(RecupFlux.java:2148)
at mediascit.recupflux_0_1.RecupFlux.tMysqlInput_5Process(RecupFlux.java:1062)
at mediascit.recupflux_0_1.RecupFlux.runJobInTOS(RecupFlux.java:4332)
at mediascit.recupflux_0_1.RecupFlux.main(RecupFlux.java:4203)
Caused by: java.text.ParseException: Unparseable date: "26 Aug 2011 08:06:00"
at java.text.DateFormat.parse(Unknown Source)
at routines.TalendDate.parseDate(TalendDate.java:501)
... 4 more
If you're using TalendDate.parseDate("dd MMM yyyy HH:mm:ss","26 Aug 2011 08:06:00") you should not have a problem. Click on the Code tab at the bottom left of your job-design and find the exact line referred to in the error (2148 from above) to double-check the source of the problem.
Well, that can't be right. Run the RecupFlux job to make sure you've got the correct line reference and then go to the Code tab again. What version are you using?
Hi, sorry to be late. Meetings ...
My Version : TIS 4.1.2.r53616
I runed the job again. Error (the same) :
connecting to socket on port 3488
connected
Exception in component tMap_3
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "30 Aug 2011 07:06:00"
at routines.TalendDate.parseDate(TalendDate.java:503)
at mediascit.recupflux_0_1.RecupFlux.tMysqlInput_6Process(RecupFlux.java:2148)
at mediascit.recupflux_0_1.RecupFlux.tMysqlInput_5Process(RecupFlux.java:1062)
at mediascit.recupflux_0_1.RecupFlux.runJobInTOS(RecupFlux.java:4332)
at mediascit.recupflux_0_1.RecupFlux.main(RecupFlux.java:4203)
Caused by: java.text.ParseException: Unparseable date: "30 Aug 2011 07:06:00"
at java.text.DateFormat.parse(Unknown Source)
at routines.TalendDate.parseDate(TalendDate.java:501)
... 4 more
disconnected
Job RecupFlux terminé à 10:33 30/08/2011.
The code :
outTMP_tmp.date_insertion = (row7.PUBDATE
.isEmpty()) ? TalendDate
.getCurrentDate()
: TalendDate
.parseDate(
"dd MMM yyyy HH:mm:ss",
row7.PUBDATE
.substring(
0,
row7.PUBDATE
.indexOf("G") - 1));
outTMP_tmp.id_statut = null;
outTMP_tmp.note = null;
outTMP_tmp.etat = "0";
outTMP = outTMP_tmp;
The line 2148 is the ".parseDate(
Exception in component tMap_3 java.lang.RuntimeException: java.text.ParseException: Unparseable date: "30 Aug 2011 07:06:00"
It seems you do not come from a English speaking country, try to use the method
TalendDate.parseDateLocale("dd MMM yyyy HH:mm:ss", "30 Aug 2011 07:06:00","EN")
Best regards
Shong