<?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 text string to numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304264#M64760</link>
    <description>Thanks, awesome help!&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Oct 2016 06:41:08 GMT</pubDate>
    <dc:creator>lion87</dc:creator>
    <dc:date>2016-10-13T06:41:08Z</dc:date>
    <item>
      <title>Convert text string to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304258#M64757</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I'm trying to convert a character string - which is in fact numeric, into numeric - 0.74144, 3.533, 4.578612&lt;/P&gt;&lt;P&gt;I've tried&amp;nbsp;SLOPE_DEG = INPUT(SLOPE_DEG,6.4); but this just returns empty spaces.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mat&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 06:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304258#M64757</guid>
      <dc:creator>lion87</dc:creator>
      <dc:date>2016-10-13T06:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text string to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304261#M64758</link>
      <description>&lt;P&gt;If you convert character to numeric, you must create a new variable. SLOPE_DEG is of type character and will stay type character.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input slope_deg $;
cards;
0.74144
3.533
4.578612
;
run;

data want;
set have;
slope_deg_num = input(slope_deg,best.);
run;

proc print;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;returns this output:&lt;/P&gt;
&lt;PRE&gt;       slope_       slope_
Obs    deg         deg_num

 1     0.74144     0.74144
 2     3.533       3.53300
 3     4.578612    4.57861
&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2016 08:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304261#M64758</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-13T08:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text string to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304262#M64759</link>
      <description>&lt;P&gt;Use best12. Or best32 as your informat.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Setting it to 6.4 tells SAS to look for an number that has 5 digits + 1 decimal point for a width of 6 and 4 of those 5 digits are after the decimal point. That's not your format based on the samples you've posted. .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 06:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304262#M64759</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-13T06:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text string to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304264#M64760</link>
      <description>Thanks, awesome help!&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Oct 2016 06:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304264#M64760</guid>
      <dc:creator>lion87</dc:creator>
      <dc:date>2016-10-13T06:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text string to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304265#M64761</link>
      <description>Thanks so much, fast reply!</description>
      <pubDate>Thu, 13 Oct 2016 06:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-text-string-to-numeric/m-p/304265#M64761</guid>
      <dc:creator>lion87</dc:creator>
      <dc:date>2016-10-13T06:41:18Z</dc:date>
    </item>
  </channel>
</rss>

