<?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: Problem converting from Date to BigDecimal in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321831#M91827</link>
    <description>Here it is 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MArN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156390iF729A0CB3A112E97/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MArN.jpg" alt="0683p000009MArN.jpg" /&gt;&lt;/span&gt;</description>
    <pubDate>Wed, 04 Sep 2013 10:25:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-04T10:25:37Z</dc:date>
    <item>
      <title>Problem converting from Date to BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321829#M91825</link>
      <description>Hello.
&lt;BR /&gt;I have an excel file with a Date column with pattern "dd/MM/yyyy" and I want to store that value in an oracle table but in number(6) format.
&lt;BR /&gt;For example, in my excel file I have "11/10/2013" and I want to store it in oracle like 201310
&lt;BR /&gt;What I do is tFileInputExcel_1 ---&amp;gt; tMap_1 ---&amp;gt; tConvertType_1 ---&amp;gt; tOracleOutput_1
&lt;BR /&gt;The datatypes in each component are:
&lt;BR /&gt;tFileInputExcel : Field Fecha_Exp, type Date, Date Pattern "dd/MM/yyyy"
&lt;BR /&gt;tMap : in the output field I have this: TalendDate.formatDate("yyyyMM",row1.Fecha_Exp) to a output field type String
&lt;BR /&gt;tConvertType : Autocast, in the input schema the field is a string, in the output schema the field is a BigDecimal
&lt;BR /&gt;tOracleOutput : the final datatype of the destination field is BigDecimal
&lt;BR /&gt;It doesn't work, the error is this:
&lt;BR /&gt;Exception in component tMap_1
&lt;BR /&gt;java.lang.NullPointerException
&lt;BR /&gt; at java.util.Calendar.setTime(Unknown Source)
&lt;BR /&gt; at java.text.SimpleDateFormat.format(Unknown Source)
&lt;BR /&gt; at java.text.SimpleDateFormat.format(Unknown Source)
&lt;BR /&gt; at java.text.DateFormat.format(Unknown Source)
&lt;BR /&gt; at routines.TalendDate.formatDate(TalendDate.java:136)
&lt;BR /&gt; at coste_distribucion.carga_r_0_1.carga_r.tFileInputExcel_1Process(carga_r.java:1505)
&lt;BR /&gt; at coste_distribucion.carga_r_0_1.carga_r.runJobInTOS(carga_r.java:2018)
&lt;BR /&gt; at coste_distribucion.carga_r_0_1.carga_r.main(carga_r.java:1886)
&lt;BR /&gt;
&lt;BR /&gt;Any help? Thanks in advance.</description>
      <pubDate>Wed, 04 Sep 2013 09:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321829#M91825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem converting from Date to BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321830#M91826</link>
      <description>Hi, &lt;BR /&gt;There is "java.lang.NullPointerException" error in tMap, would you mind uploading the tMap editor screenshot into forum so that we can get the current mapped row structure.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Wed, 04 Sep 2013 10:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321830#M91826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T10:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem converting from Date to BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321831#M91827</link>
      <description>Here it is 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MArN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156390iF729A0CB3A112E97/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MArN.jpg" alt="0683p000009MArN.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 04 Sep 2013 10:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321831#M91827</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T10:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem converting from Date to BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321832#M91828</link>
      <description>Hi, 
&lt;BR /&gt;The method "TalendDate.formatDate(String pattern, java.util.Date date)" Formats a Date into a date/time string not Date.(I suspect which makes java.lang.NullPointerException ) 
&lt;BR /&gt;In you case, you want to get a BigDecimal. 
&lt;BR /&gt;Please try this expression: 
&lt;BR /&gt; 
&lt;PRE&gt;new BigDecimal (TalendDate.formatDate("yyyyMM",row1.date))&lt;/PRE&gt; 
&lt;BR /&gt;See my screenshots for details 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MB7K.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154752i6A6DC58216A505BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MB7K.png" alt="0683p000009MB7K.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAry.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153654iF7704031FD190D6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAry.png" alt="0683p000009MAry.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 04 Sep 2013 11:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321832#M91828</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T11:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem converting from Date to BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321833#M91829</link>
      <description>Hi, 
&lt;BR /&gt;Any update for your issue? Feel free post your issue on forum.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 05 Sep 2013 06:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-converting-from-Date-to-BigDecimal/m-p/2321833#M91829</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-05T06:25:25Z</dc:date>
    </item>
  </channel>
</rss>

