<?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: Using Length and Substr function only how can i extract age from the data ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479424#M123754</link>
    <description>&lt;P&gt;length() is not needed and actually dangerous (think of kids and centenarians).&lt;/P&gt;
&lt;P&gt;Use anydigit() to find the first occurence of a digit, and substr() from there.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2018 08:58:56 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-07-19T08:58:56Z</dc:date>
    <item>
      <title>Using Length and Substr function only how can i extract age from the data ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479331#M123700</link>
      <description>&lt;P&gt;Will someone provide me the solution for subjected problem with the below data, I want to extract age from the below data using 'Length' and 'Substr' function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="a-b-r-La"&gt;Data test;
input nameage $10.;
datalines;
Ram24
Albertaa26
Bob85
AB23
;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 01:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479331#M123700</guid>
      <dc:creator>vishalrajpoot3</dc:creator>
      <dc:date>2018-07-19T01:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Length and Substr function only how can i extract age from the data ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479336#M123704</link>
      <description>&lt;P&gt;Show us the code you have already tried.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 01:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479336#M123704</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-19T01:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using Length and Substr function only how can i extract age from the data ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479344#M123706</link>
      <description>&lt;P&gt;Do you want the extracted age to be character or numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you being forced to use the tools you mentioned?&amp;nbsp; They're not the best ones for the job.&amp;nbsp; Using those only might force you to assume that the age is always two digits long.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 01:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479344#M123706</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-19T01:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Length and Substr function only how can i extract age from the data ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479424#M123754</link>
      <description>&lt;P&gt;length() is not needed and actually dangerous (think of kids and centenarians).&lt;/P&gt;
&lt;P&gt;Use anydigit() to find the first occurence of a digit, and substr() from there.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 08:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479424#M123754</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-19T08:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Length and Substr function only how can i extract age from the data ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479433#M123760</link>
      <description>Hi Vishal,&lt;BR /&gt;&lt;BR /&gt;Age=input(substr(nameage,length(nameage)-1),8.);&lt;BR /&gt;&lt;BR /&gt;In this way you can use substr and length function both.If you are sure about that age is coming as a last 2 digit.</description>
      <pubDate>Thu, 19 Jul 2018 09:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479433#M123760</guid>
      <dc:creator>akash1088</dc:creator>
      <dc:date>2018-07-19T09:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Length and Substr function only how can i extract age from the data ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479513#M123805</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want age in numeric, yes only for this scenario age is only two digit long.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 14:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Length-and-Substr-function-only-how-can-i-extract-age-from/m-p/479513#M123805</guid>
      <dc:creator>vishalrajpoot3</dc:creator>
      <dc:date>2018-07-19T14:22:14Z</dc:date>
    </item>
  </channel>
</rss>

