<?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: How to change a variable from Character to numeric without changing it's format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-variable-from-Character-to-numeric-without/m-p/679972#M205409</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA ONE;
INPUT name $ month $;
cards;
Thomas 2017-01
Ricky  2018-09
;

data two;
    set one;
    month_1 = input(month, anydtdte.);
    format month_1 yymmd7.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 28 Aug 2020 08:02:37 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2020-08-28T08:02:37Z</dc:date>
    <item>
      <title>How to change a variable from Character to numeric without changing it's format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-variable-from-Character-to-numeric-without/m-p/679969#M205407</link>
      <description>&lt;P&gt;DATA ONE;&lt;BR /&gt;INPUT &lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159673"&gt;@001&lt;/a&gt; NAME $10.&lt;BR /&gt;@011 MONTH $CHAR8.&lt;BR /&gt;;&lt;BR /&gt;cards;&lt;BR /&gt;Thomas 2017-01&lt;BR /&gt;Ricky 2018-09&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data two;&lt;BR /&gt;set one;&lt;BR /&gt;month_1 = input(month,yymmd.);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want output in which variable month_1 will be numeric in nature and format is going to be like&amp;nbsp;2017-01.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 07:34:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-variable-from-Character-to-numeric-without/m-p/679969#M205407</guid>
      <dc:creator>Abhinav26</dc:creator>
      <dc:date>2020-08-28T07:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a variable from Character to numeric without changing it's format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-variable-from-Character-to-numeric-without/m-p/679972#M205409</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA ONE;
INPUT name $ month $;
cards;
Thomas 2017-01
Ricky  2018-09
;

data two;
    set one;
    month_1 = input(month, anydtdte.);
    format month_1 yymmd7.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Aug 2020 08:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-variable-from-Character-to-numeric-without/m-p/679972#M205409</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-08-28T08:02:37Z</dc:date>
    </item>
  </channel>
</rss>

