Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want extract a year from a date by using this function :
Integer.parseInt(TalendDate.formatDate("yyyy",consultation.Date))
I find a java error.
Please i request your help to resolve this.
Thank you.
Thank you for this speed.
i receive this error message:
Exception in component tMap_1
java.lang.NullPointerException
at java.util.Calendar.setTime(Unknown Source)
at java.text.SimpleDateFormat.format(Unknown Source)
at java.text.SimpleDateFormat.format(Unknown Source)
at java.text.DateFormat.format(Unknown Source)
at routines.TalendDate.formatDate(TalendDate.java:135)
at testcubeolap.extract_year_0_1.extract_year.tFileInputExcel_1Process(extract_year.java:1206)
at testcubeolap.extract_year_0_1.extract_year.runJobInTOS(extract_year.java:1612)
at testcubeolap.extract_year_0_1.extract_year.main(extract_year.java:1469)
my date format is "dd-MM-yyyy"
Thank you .
Thank you ,
but here i receive this :
Exception in component tMap_1
java.lang.NullPointerException
at testcubeolap.extract_year_0_1.extract_year.tFileInputExcel_1Process(extract_year.java:1208)
at testcubeolap.extract_year_0_1.extract_year.runJobInTOS(extract_year.java:1613)
at testcubeolap.extract_year_0_1.extract_year.main(extract_year.java:1470)
Furthermore, i'm sure that i don't have a null value on my source table.
what i do now, i'm blocked here.
i tried this function :
(consultation.Date != null) ?
TalendDate.getPartOfDate("yyyy",consultation.Date) : 100
and i find a lot of 0 and the last value is 100.
do you say something about?
Thank you.