<?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: Character to Numberic in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571434#M12169</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274150"&gt;@lisa2002&lt;/a&gt;&amp;nbsp;If the solution worked for you, then please mark the post by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;as a solution. It might be helpful to others searching for similar problems.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2019 15:27:30 GMT</pubDate>
    <dc:creator>koyelghosh</dc:creator>
    <dc:date>2019-07-05T15:27:30Z</dc:date>
    <item>
      <title>Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571401#M12162</link>
      <description>&lt;P&gt;SAS Team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good morning and happy Friday.&amp;nbsp; I have a data set with dates that I want to change from character to numeric.&amp;nbsp; I need some assistance since my code&amp;nbsp;CREATED=input(Created_On,8.); changed character to numeric but did NOT transfer my date 9/17/2018.&amp;nbsp; What am I missing from my code that is hindering my dates from transfering to my new column accordingly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.PA_POC;&lt;/P&gt;&lt;P&gt;set&amp;nbsp;POC_1."FORM RESPONSE"n;&lt;BR /&gt;/*place Created_On as numeric*/&lt;BR /&gt;CREATED=input(Created_On,8.);&lt;BR /&gt;/*******why isn't the dates moving to the new column *****************************/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;created_on&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;created&lt;/P&gt;&lt;P&gt;9/17/18&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;9/20/18&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;1/1/19&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 14:10:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571401#M12162</guid>
      <dc:creator>lisa2002</dc:creator>
      <dc:date>2019-07-05T14:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571415#M12163</link>
      <description>&lt;P&gt;There is no such thing as a numeric equivalent of the text string '9/17/18'. SAS does not know (and I do not know) how to turn this exact text string into a number, because it is not a number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now perhaps you wanted the text string '9/17/18' to be interpreted as the date September 17, 2018. Then you could use&amp;nbsp;&lt;EM&gt;something like &lt;/EM&gt;this code with a &lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=allprodslang&amp;amp;docsetTarget=syntaxByCategory-informat.htm&amp;amp;locale=en#n1d18o4bh2i869n1ecks0tifltc8" target="_self"&gt;date/time informat&lt;/A&gt; to cause SAS to interpret the string as a date or datetime as appropriate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    y='9/17/18';
	num_var=input(y,anydtdte.);
	format num_var date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 14:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571415#M12163</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-05T14:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571429#M12166</link>
      <description>Thank you for explaining this to me. The code definitely worked.</description>
      <pubDate>Fri, 05 Jul 2019 15:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571429#M12166</guid>
      <dc:creator>lisa2002</dc:creator>
      <dc:date>2019-07-05T15:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571431#M12167</link>
      <description>&lt;P&gt;when placing&amp;nbsp; y='9/17/18'; how will it work if I multiple dates in the same row?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571431#M12167</guid>
      <dc:creator>lisa2002</dc:creator>
      <dc:date>2019-07-05T15:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571433#M12168</link>
      <description>&lt;P&gt;You just need to change the original code you wrote to use the ANYDTDTE informat in the INPUT function.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571433#M12168</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-05T15:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571434#M12169</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274150"&gt;@lisa2002&lt;/a&gt;&amp;nbsp;If the solution worked for you, then please mark the post by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;as a solution. It might be helpful to others searching for similar problems.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571434#M12169</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-07-05T15:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Character to Numberic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571441#M12170</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274150"&gt;@lisa2002&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;when placing&amp;nbsp; y='9/17/18'; how will it work if I multiple dates in the same row?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Multiple dates where?&amp;nbsp; Are you saying your character strings has multiple date values?&amp;nbsp; Or that you have multiple character variables that each contain one date string?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Character-to-Numberic/m-p/571441#M12170</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-05T15:43:10Z</dc:date>
    </item>
  </channel>
</rss>

