[resolved] Date is not supported in the if else condition
Hi, I have input excel(row1) with dates in the format "mm/dd/yyyy" and i have mapped the date in tmap expression builder using the if else condition. In the output the the calculated double value should be the result. Input excel Format: Date Condition 08/09/2015 Y 10/09/2015 N In tmap expression builder, i have given the condition as below, row1.Condition.equals("Y")? ((TalendDate.diffDate(row1.Date, TalendDate.getCurrentDate(), "dd") < 365 ) ? 0.20 : 0.5):0.0 In the above if condition, the row1.Date is not taking the value from the input excel sheet. Getting the below error as, Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Exception in component tMap_1 java.lang.NullPointerException My requirement is to find the difference between the date from the input excel and current date and if its less than 365 days then reture value 0.20 otherwise 0.5. If the condition not satisfies then should return value 0. Please help me to correct this one. Or suggest me anyother alternative way to call the date from input excel.