Hi, I work on TIS 2.4.2. and I have a problem with some dates. I have a source datebase that have a field date that can be sometimes "null" And I tried to : - convert it to string in the SQL request - I tried to change the type in a schema of the source to String - I tried to make a condition in a tmap : date.equals("null")? " ":date or I tried date == "null"? " ":date What I have to do? create a routine? Thanks in advance
Hi, If your date input is string, try with : date.equals("")?null:TalendDate.ParseDate("MM-dd-yyyy HH:mm:ss",date)
I had a case like this, for exemple : (input_map.DT_DEB_VALID_OBJ.equals(""))?null:TalendDate.parseDate("MM/dd/yyyy",input_map.DT_DEB_VALID_OBJ) Best Regards, Guillaume.
But my input is not a String It's a date. And I already tried what you propose. In addition, It's not " " but null that I have on my source database so it's not the same case. But thanks
not sure what exactly ur requirement is
what i understood is , u r trying tp parse thedate and it is hitting null pointer exception.
if this is the case
try
null != date? parse : do not parse or set it to null
hopr this would help
How to handle null date value in talend.I m using date data type.at the time of excel writing i m unable to handle null value.plz provide sme suggestion