<?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 multiple length character price variable to numeric in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649192#M19229</link>
    <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NEW = input(compress(VAR,"€"),10.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Increase the informat width as needed.&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2020 12:22:23 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-05-20T12:22:23Z</dc:date>
    <item>
      <title>Convert a multiple length character price variable to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649131#M19226</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a character variable under this form :&lt;/P&gt;
&lt;P&gt;61.39€&lt;/P&gt;
&lt;P&gt;47.32€&lt;/P&gt;
&lt;P&gt;124.45€&lt;/P&gt;
&lt;P&gt;12.3€&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and i'd like to convert it into a numeric variable under that form :&lt;/P&gt;
&lt;P&gt;61.39&lt;/P&gt;
&lt;P&gt;47.32&lt;/P&gt;
&lt;P&gt;124.45&lt;/P&gt;
&lt;P&gt;12.3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried this code :&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data WANT;
Set HAVE;
NEW=input(strip(scan(VAR,-1,"€")), 5);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but i don't get what i want. I only get the price with three digits before the comma. Moreover those prices are only displayed with one decimal instead of 2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 09:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649131#M19226</guid>
      <dc:creator>Mathis1</dc:creator>
      <dc:date>2020-05-20T09:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a multiple length character price variable to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649135#M19227</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323613"&gt;@Mathis1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try the&amp;nbsp;NLMNLEURw.d informat:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
	set HAVE;
	NEW=input(var,NLMNLEUR8.2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 09:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649135#M19227</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-05-20T09:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a multiple length character price variable to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649192#M19229</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NEW = input(compress(VAR,"€"),10.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Increase the informat width as needed.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 12:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Convert-a-multiple-length-character-price-variable-to-numeric/m-p/649192#M19229</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-20T12:22:23Z</dc:date>
    </item>
  </channel>
</rss>

