<?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 from char to mmddyy10. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569568#M160529</link>
    <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input chardate $ 1-10;
datalines;
2017-10-30
2019-01-12
2011-08-01
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and want my dates to look like this:&lt;/P&gt;&lt;P&gt;10/30/2017&lt;/P&gt;&lt;P&gt;12/01/2019&lt;/P&gt;&lt;P&gt;08/01/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input(compress(chardate,'-'), 8.) as wantdate format = MMDDYY10.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;because I saw somewhere that you have to change it to num. but when I run this piece of code in a proc sql all I get is *******.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2019 18:05:13 GMT</pubDate>
    <dc:creator>serrld113</dc:creator>
    <dc:date>2019-06-27T18:05:13Z</dc:date>
    <item>
      <title>from char to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569568#M160529</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input chardate $ 1-10;
datalines;
2017-10-30
2019-01-12
2011-08-01
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and want my dates to look like this:&lt;/P&gt;&lt;P&gt;10/30/2017&lt;/P&gt;&lt;P&gt;12/01/2019&lt;/P&gt;&lt;P&gt;08/01/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input(compress(chardate,'-'), 8.) as wantdate format = MMDDYY10.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;because I saw somewhere that you have to change it to num. but when I run this piece of code in a proc sql all I get is *******.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569568#M160529</guid>
      <dc:creator>serrld113</dc:creator>
      <dc:date>2019-06-27T18:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: from char to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569571#M160531</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table want as
   select input(chardate, yymmdd10.) as wantdate format = MMDDYY10.
   from have;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569571#M160531</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-27T18:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: from char to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569572#M160532</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;wantdate = input(chardate,yymmdd10.);
format wantdate mmddyy10.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569572#M160532</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-27T18:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: from char to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569611#M160545</link>
      <description>&lt;P&gt;If you take a number like&amp;nbsp;20,171,030 are ask SAS to format it as a date you are asking for the date that 20 million days after start of 1960.&lt;/P&gt;
&lt;P&gt;It would take 5 digits for the just the year part to display that. SAS formats cannot handle dates that far into the future.&lt;/P&gt;
&lt;PRE&gt;522   data _null_;
523     days=20171030;
524     years=int(days/365.25);
525     year=1960+years;
526     put (years year) (=comma10.);
527   run;

years=55,225 year=57,185
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 19:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/from-char-to-mmddyy10/m-p/569611#M160545</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-27T19:58:36Z</dc:date>
    </item>
  </channel>
</rss>

