Hello everyone ,
i'm trying to compare 2 dates "fact_date" and "discard_date" , the main topic is that the fact_date must became first (ex:fact-date:16/062016 then the discard_date 17/062016) , so first i made a var named comp and the type is int { TalendDate.compareDate(row1.Fact_Date,row1.Discard_date) } then i tried to ,based on those results, decide if i keep the first date in fact_date , and the second in discard_date or switch them (the second date in fact_date and the first one in discard_date) , there is the second part :
i created a second var named keep typed Object
Var.comp > 0 ? fact_alim.date1=row1.Discard_date && fact_alim.date2=row1.Fact_Date : fact_alim.date1=row1.Fact_Date && fact_alim.date2=row1.Discard_date
Multiple markers at this line
- Syntax error on token "=", <= expected
- The operator <= is undefined for the argument type(s) java.util.Date,
java.util.Date
- Syntax error on token "=", <= expected
- The operator <= is undefined for the argument type(s) java.util.Date,
java.util.Date
- Syntax error on token "=", <= expected
- The operator <= is undefined for the argument type(s) java.util.Date,
java.util.Date
so i tried this syntax:
Var.comp > 0 ? fact_alim.date1==row1.Discard_date && fact_alim.date2==row1.Fact_Date : fact_alim.date1==row1.Fact_Date && fact_alim.date2==row1.Discard_date
no error , but no results neither , so i changed the type of keep from object to int and changed it to :
Var.comp > 0 ? fact_alim.date1==row1.Discard_date && fact_alim.date2==row1.Fact_Date && Var.keep==1: fact_alim.date1==row1.Fact_Date && fact_alim.date2==row1.Discard_date && Var.keep==0
and i got: Type mismatch: cannot convert from boolean to int
what should i do ?nothing works ..