<?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: Convert Long to Int in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321823#M91819</link>
    <description>Hello guy
&lt;BR /&gt;long l1=12l;
&lt;BR /&gt;int i1=(int)l1;
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
    <pubDate>Mon, 14 Sep 2009 04:12:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-09-14T04:12:13Z</dc:date>
    <item>
      <title>Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321822#M91818</link>
      <description>Hello all,&lt;BR /&gt; I need to convert from a long type to a int. I have used intValue() method but I get an error. I have tried to convert long to string with toString() but I get another error. Examples:&lt;BR /&gt;   ((new Date()).getTime()).intValue()   --&amp;gt; Error&lt;BR /&gt;   toString((new Date()).getTime())  --&amp;gt; Error&lt;BR /&gt;   Can anyone help me?&lt;BR /&gt;Regards, Nardinar</description>
      <pubDate>Sat, 16 Nov 2024 13:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321822#M91818</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321823#M91819</link>
      <description>Hello guy
&lt;BR /&gt;long l1=12l;
&lt;BR /&gt;int i1=(int)l1;
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 14 Sep 2009 04:12:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321823#M91819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-14T04:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321824#M91820</link>
      <description>Hi,
&lt;BR /&gt;I followed the solution given by Shong, as seen in the attached screenshot, yet I still get the error 
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problem: &lt;BR /&gt; Cannot cast from Long to int&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Has anybody a solution to this?</description>
      <pubDate>Tue, 15 Sep 2009 10:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321824#M91820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-15T10:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321825#M91821</link>
      <description>Hello 
&lt;BR /&gt;Uncheck the 'nullable' option of column.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 15 Sep 2009 10:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321825#M91821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-15T10:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321826#M91822</link>
      <description>Thank you, Shong!
&lt;BR /&gt;Unchecking the "Nullable" option was the solution.
&lt;BR /&gt;In the meanwhile, I found another one, that worked with the "Nullable" option checked: 
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;// to Integer ii from Long nn&lt;BR /&gt;ii = nn.intValue();&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;This does not work when "Nullable" is not checked.
&lt;BR /&gt;
&lt;BR /&gt;I'd like to know the explanation of this and I'd like to know this kind of details, so that I do not need to ask simple questions on the forum. 
&lt;BR /&gt;Where can I get such information?
&lt;BR /&gt;Thank you.</description>
      <pubDate>Tue, 15 Sep 2009 10:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321826#M91822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-15T10:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321827#M91823</link>
      <description>Hello 
&lt;BR /&gt;It is basic java knowledge, Long is a class which extends Object class, 
&lt;BR /&gt;intValue() is one of method of Long,
&lt;BR /&gt; /**
&lt;BR /&gt; * Returns the value of this &amp;lt;code&amp;gt;Long&amp;lt;/code&amp;gt; as an
&lt;BR /&gt; * &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;.
&lt;BR /&gt; */
&lt;BR /&gt; public int intValue() {
&lt;BR /&gt; return (int)value;
&lt;BR /&gt; }
&lt;BR /&gt;long is a data type.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 15 Sep 2009 11:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321827#M91823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-15T11:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Long to Int</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321828#M91824</link>
      <description>To handle null values, java &lt;B&gt;ternary operator &lt;/B&gt; can be used while converting type in a tMap.  &lt;BR /&gt;Example : String to BigDecimal&lt;BR /&gt; &lt;PRE&gt;row1.SALARY != null ? new BigDecimal(row1.SALARY) : null&lt;/PRE&gt;&lt;BR /&gt;Thanks and Regards,&lt;BR /&gt;Pravu Mishra.</description>
      <pubDate>Tue, 15 Sep 2009 11:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Long-to-Int/m-p/2321828#M91824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-15T11:28:37Z</dc:date>
    </item>
  </channel>
</rss>

