<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: NullpointerException and String to Date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/NullpointerException-and-String-to-Date/m-p/2216537#M12504</link>
    <description>&lt;P&gt;You were close!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example:&lt;/P&gt;&lt;PRE&gt;row2.Actual_Close_Date == null ? 0 :TalendDate.parseDate("EEE MMM dd HH:mm:ss Z yyyy",row2.Actual_Close_Date)&lt;/PRE&gt;&lt;P&gt;...will work if you replace 0 with a valid date or the word null.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2017 18:44:19 GMT</pubDate>
    <dc:creator>cterenzi</dc:creator>
    <dc:date>2017-04-19T18:44:19Z</dc:date>
    <item>
      <title>NullpointerException and String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/NullpointerException-and-String-to-Date/m-p/2216536#M12503</link>
      <description>&lt;P&gt;I am doing all of these transformations in tMap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Actual_Close_Date is a string data type in the data source. First I tried,&lt;/P&gt; 
&lt;P&gt;TalendDate.parseDate("MM/dd/yyyy",row.Actual_Close_Date) it gives an error:&lt;/P&gt; 
&lt;P&gt;Unparseable date: "Fri Nov 15 00:00:00 CST 2013"&lt;/P&gt; 
&lt;P&gt;Then I tried:&lt;/P&gt; 
&lt;P&gt;TalendDate.parseDate("EEE MMM dd HH:mm:ss Z yyyy",row2.Actual_Close_Date) it gives an error:&lt;/P&gt; 
&lt;P&gt;java.lang.NullPointerException&lt;/P&gt; 
&lt;P&gt;Then I tried:&lt;/P&gt; 
&lt;P&gt;row2.Actual_Close_Date == null ? 0 :TalendDate.parseDate("EEE MMM dd HH:mm:ss Z yyyy",row2.Actual_Close_Date) it gives an error:&lt;/P&gt; 
&lt;P&gt;Type mismatch: cannot convert from Object&amp;amp;Comparable&amp;lt;?&amp;gt;&amp;amp;Serializable to Date&lt;/P&gt; 
&lt;P&gt;Then I tried:&lt;/P&gt; 
&lt;PRE&gt;(row2.Actual_Close_Date.equals(""))||(row2.Actual_Close_Date==null) ? null : &lt;BR /&gt;(TalendDate.parseDate("EEE MMM dd HH:mm:ss Z yyyy",row2.Actual_Close_Date))&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;Error it gives:&lt;/P&gt; 
&lt;P&gt;java.lang.NullPointerException&lt;/P&gt; 
&lt;P&gt;I have run out of options and googlefu has dried up for me.&lt;/P&gt; 
&lt;P&gt;The format I am requesting is "MM/dd/yyyy".&lt;/P&gt; 
&lt;P&gt;How can I fix this please. Any insights would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 17:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/NullpointerException-and-String-to-Date/m-p/2216536#M12503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T17:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: NullpointerException and String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/NullpointerException-and-String-to-Date/m-p/2216537#M12504</link>
      <description>&lt;P&gt;You were close!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example:&lt;/P&gt;&lt;PRE&gt;row2.Actual_Close_Date == null ? 0 :TalendDate.parseDate("EEE MMM dd HH:mm:ss Z yyyy",row2.Actual_Close_Date)&lt;/PRE&gt;&lt;P&gt;...will work if you replace 0 with a valid date or the word null.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 18:44:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/NullpointerException-and-String-to-Date/m-p/2216537#M12504</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-04-19T18:44:19Z</dc:date>
    </item>
  </channel>
</rss>

