<?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: [resolved] Always two decimals in my int .## in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361212#M125628</link>
    <description>I assume you are outputting these numbers as a string. If you are supplying them as numbers, the format is of little consequence apart from to humans. So this solution is intended for converting the numbers before output as String. 
&lt;BR /&gt;You can either create a routine wrapper for this (preferable) or use it as I demonstrate it below.... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;(new java.text.DecimalFormat("0.00")).format((row1.intColumn/100))&lt;/PRE&gt; 
&lt;BR /&gt; &amp;nbsp; 
&lt;BR /&gt;What I am doing is setting a format of a number with 2 decimal places ("0.00") using the DecimalFormat class. This can go into a tMap column expression or into a routine.</description>
    <pubDate>Fri, 03 Jul 2015 09:36:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-03T09:36:46Z</dc:date>
    <item>
      <title>[resolved] Always two decimals in my int .##</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361211#M125627</link>
      <description>&lt;P&gt;Hi there&lt;BR /&gt;I have a column (Int) with prices in my db that looks like this&lt;BR /&gt;2290&lt;BR /&gt;500&lt;BR /&gt;1300&lt;BR /&gt;I need too make them&lt;BR /&gt;22.90&lt;BR /&gt;5.00&lt;BR /&gt;13.00&lt;BR /&gt;In tmap i just put the preis/100 as a double but then i get&lt;BR /&gt;22.9&lt;BR /&gt;5.0&lt;BR /&gt;13.0&lt;BR /&gt;&lt;BR /&gt;How can i make it like i want, i dont need to round or anything just put a . two steps to the left from the last number.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 09:13:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361211#M125627</guid>
      <dc:creator>jensej</dc:creator>
      <dc:date>2015-07-03T09:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Always two decimals in my int .##</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361212#M125628</link>
      <description>I assume you are outputting these numbers as a string. If you are supplying them as numbers, the format is of little consequence apart from to humans. So this solution is intended for converting the numbers before output as String. 
&lt;BR /&gt;You can either create a routine wrapper for this (preferable) or use it as I demonstrate it below.... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;(new java.text.DecimalFormat("0.00")).format((row1.intColumn/100))&lt;/PRE&gt; 
&lt;BR /&gt; &amp;nbsp; 
&lt;BR /&gt;What I am doing is setting a format of a number with 2 decimal places ("0.00") using the DecimalFormat class. This can go into a tMap column expression or into a routine.</description>
      <pubDate>Fri, 03 Jul 2015 09:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361212#M125628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-03T09:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Always two decimals in my int .##</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361213#M125629</link>
      <description>&lt;BLOCKQUOTE&gt;
  rhall_2.0 wrote: 
 &lt;BR /&gt;I assume you are outputting these numbers as a string. If you are supplying them as numbers, the format is of little consequence apart from to humans. So this solution is intended for converting the numbers before output as String. 
 &lt;BR /&gt;You can either create a routine wrapper for this (preferable) or use it as I demonstrate it below.... 
 &lt;BR /&gt; 
 &lt;BR /&gt; 
 &lt;BR /&gt; 
 &lt;PRE&gt;(new java.text.DecimalFormat("0.00")).format((row1.intColumn/100))&lt;/PRE&gt; 
 &lt;BR /&gt; &amp;nbsp; 
 &lt;BR /&gt;What I am doing is setting a format of a number with 2 decimal places ("0.00") using the DecimalFormat class. This can go into a tMap column expression or into a routine. 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Format looks good now but values like 2854 changes to 28.00 and 3972 to 39.00. I need to have them 28.54 and 39.72</description>
      <pubDate>Tue, 07 Jul 2015 12:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361213#M125629</guid>
      <dc:creator>jensej</dc:creator>
      <dc:date>2015-07-07T12:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Always two decimals in my int .##</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361214#M125630</link>
      <description>Ah OK. Try this.....&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;(new java.text.DecimalFormat("0.00")).format(((double)row1.intColumn/100))&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jul 2015 13:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361214#M125630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-07T13:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Always two decimals in my int .##</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361215#M125631</link>
      <description>&lt;BLOCKQUOTE&gt;
 rhall_2.0 wrote:
 &lt;BR /&gt;Ah OK. Try this.....
 &lt;BR /&gt;
 &lt;BR /&gt;
 &lt;PRE&gt;(new java.text.DecimalFormat("0.00")).format(((double)row1.intColumn/100))&lt;/PRE&gt;
 &lt;BR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Perfect, thanks mate!</description>
      <pubDate>Tue, 07 Jul 2015 15:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Always-two-decimals-in-my-int/m-p/2361215#M125631</guid>
      <dc:creator>jensej</dc:creator>
      <dc:date>2015-07-07T15:26:49Z</dc:date>
    </item>
  </channel>
</rss>

