Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unparseable date "null"

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
Labels (2)
8 Replies
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

In fact I have a problem to read a date that is null
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

thanks I will try
Anonymous
Not applicable
Author

thanks i had same issue with " " 
date.equals("")?null:TalendDate.ParseDate("MM-dd-yyyy HH:mm:ss",date)

and I tried and it works for me
_AnonymousUser
Specialist III
Specialist III

How to handle null value in talend.I m using date data type.at the time of excel  writing i m unable to handle null value.
_AnonymousUser
Specialist III
Specialist III

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