<?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: Removing the last digit from a numerical variable if it has 4 digits in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821543#M324343</link>
    <description>&lt;P&gt;This should do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if score &amp;gt;= 1000 then score = int(score/10);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Jul 2022 05:37:06 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2022-07-05T05:37:06Z</dc:date>
    <item>
      <title>Removing the last digit from a numerical variable if it has 4 digits</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821542#M324342</link>
      <description>&lt;P&gt;Hi, in one of the numeric column of my dataset, I have 3 digits and 4 digits number.&lt;BR /&gt;I want to remove the last digit if the number have 4 digit, for example:&lt;/P&gt;&lt;P&gt;No Score&lt;/P&gt;&lt;P&gt;1 789&lt;/P&gt;&lt;P&gt;2 673&lt;/P&gt;&lt;P&gt;3 6470&lt;/P&gt;&lt;P&gt;4 783&lt;/P&gt;&lt;P&gt;5 7280&amp;nbsp;&lt;/P&gt;&lt;P&gt;6 785&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the 6470 to become 647 and 7280 to become 728, how should I do that with SAS programming?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:34:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821542#M324342</guid>
      <dc:creator>CatherineLim</dc:creator>
      <dc:date>2022-07-05T05:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removing the last digit from a numerical variable if it has 4 digits</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821543#M324343</link>
      <description>&lt;P&gt;This should do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if score &amp;gt;= 1000 then score = int(score/10);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821543#M324343</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-07-05T05:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Removing the last digit from a numerical variable if it has 4 digits</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821553#M324353</link>
      <description>&lt;P&gt;Or take a quick detour to character:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
score = input(substr(put(score,4.-l),1,3),3.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jul 2022 08:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-the-last-digit-from-a-numerical-variable-if-it-has-4/m-p/821553#M324353</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-05T08:10:28Z</dc:date>
    </item>
  </channel>
</rss>

