<?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 a string to Big Decimal in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348716#M115797</link>
    <description>&lt;P&gt;You can use the `BigDecimal` class in Java to convert the string "$6.00" to a `BigDecimal` object. Here's an example code snippet that shows how to do this:&lt;/P&gt;&lt;P&gt;String str = "$6.00";&lt;/P&gt;&lt;P&gt;BigDecimal bd = new BigDecimal(str.replace("$", ""));&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;P&gt;We start by initializing a string variable `str` with the value "$6.00".&lt;/P&gt;&lt;P&gt;We then create a `BigDecimal` object `bd` by passing the string `str` to the constructor of `BigDecimal`.&lt;/P&gt;&lt;P&gt;However, since the string `str` contains a currency symbol "$" that is not valid in a `BigDecimal` object, we remove it using the `replace()` method. The resulting string "6.00" can then be converted to a `BigDecimal` object using its constructor.&lt;/P&gt;&lt;P&gt;Note that you may also need to handle any potential exceptions that can be thrown by the `BigDecimal` constructor, such as `NumberFormatException` if the input string is not a valid decimal number.    &lt;A href="https://www.skywardalpine.com/" alt="https://www.skywardalpine.com/" target="_blank"&gt;SkyWard Alpine Login&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 05:48:16 GMT</pubDate>
    <dc:creator>Jamesclary</dc:creator>
    <dc:date>2023-03-01T05:48:16Z</dc:date>
    <item>
      <title>Convert a string to Big Decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348714#M115795</link>
      <description>&lt;P&gt;I have the following string in a csv delimeted file that I need to convert to a BigDecimal :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"$6.00"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348714#M115795</guid>
      <dc:creator>RVeitch_84</dc:creator>
      <dc:date>2024-11-15T22:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a string to Big Decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348715#M115796</link>
      <description>&lt;P&gt;try this expression on tJavaRow&lt;/P&gt;&lt;P&gt;output_row.data = new java.math.BigDecimal(input_row.data.replace("$",""));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or on tMap:&lt;/P&gt;&lt;P&gt;new java.math.BigDecimal(row1.data.replace("$",""))&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 01:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348715#M115796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-01T01:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a string to Big Decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348716#M115797</link>
      <description>&lt;P&gt;You can use the `BigDecimal` class in Java to convert the string "$6.00" to a `BigDecimal` object. Here's an example code snippet that shows how to do this:&lt;/P&gt;&lt;P&gt;String str = "$6.00";&lt;/P&gt;&lt;P&gt;BigDecimal bd = new BigDecimal(str.replace("$", ""));&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;P&gt;We start by initializing a string variable `str` with the value "$6.00".&lt;/P&gt;&lt;P&gt;We then create a `BigDecimal` object `bd` by passing the string `str` to the constructor of `BigDecimal`.&lt;/P&gt;&lt;P&gt;However, since the string `str` contains a currency symbol "$" that is not valid in a `BigDecimal` object, we remove it using the `replace()` method. The resulting string "6.00" can then be converted to a `BigDecimal` object using its constructor.&lt;/P&gt;&lt;P&gt;Note that you may also need to handle any potential exceptions that can be thrown by the `BigDecimal` constructor, such as `NumberFormatException` if the input string is not a valid decimal number.    &lt;A href="https://www.skywardalpine.com/" alt="https://www.skywardalpine.com/" target="_blank"&gt;SkyWard Alpine Login&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 05:48:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-a-string-to-Big-Decimal/m-p/2348716#M115797</guid>
      <dc:creator>Jamesclary</dc:creator>
      <dc:date>2023-03-01T05:48:16Z</dc:date>
    </item>
  </channel>
</rss>

