<?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 How to create a numeric variable by taking numeric portion of a character variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-numeric-variable-by-taking-numeric-portion-of-a/m-p/294605#M61469</link>
    <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable 'TPT' containing numbers and text. I need to create a numeric variable (TPTNUM) from numeric portion of TPT. Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TPT&lt;/P&gt;&lt;P&gt;0.5 hours&lt;/P&gt;&lt;P&gt;1 hour&lt;/P&gt;&lt;P&gt;1.5 hours&lt;/P&gt;&lt;P&gt;2 hours&lt;/P&gt;&lt;P&gt;2.5 hours&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output needed;&lt;/P&gt;&lt;P&gt;0.5&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1.5&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2.5&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sun, 28 Aug 2016 01:50:23 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2016-08-28T01:50:23Z</dc:date>
    <item>
      <title>How to create a numeric variable by taking numeric portion of a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-numeric-variable-by-taking-numeric-portion-of-a/m-p/294605#M61469</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable 'TPT' containing numbers and text. I need to create a numeric variable (TPTNUM) from numeric portion of TPT. Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TPT&lt;/P&gt;&lt;P&gt;0.5 hours&lt;/P&gt;&lt;P&gt;1 hour&lt;/P&gt;&lt;P&gt;1.5 hours&lt;/P&gt;&lt;P&gt;2 hours&lt;/P&gt;&lt;P&gt;2.5 hours&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output needed;&lt;/P&gt;&lt;P&gt;0.5&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1.5&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2.5&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2016 01:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-numeric-variable-by-taking-numeric-portion-of-a/m-p/294605#M61469</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-08-28T01:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a numeric variable by taking numeric portion of a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-numeric-variable-by-taking-numeric-portion-of-a/m-p/294608#M61471</link>
      <description>&lt;P&gt;If the number is the first part of the field:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TPTNUM = input(scan(TPT, 1, " "), best.);&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2016 02:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-numeric-variable-by-taking-numeric-portion-of-a/m-p/294608#M61471</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-08-28T02:28:32Z</dc:date>
    </item>
  </channel>
</rss>

