<?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 Format problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399631#M96809</link>
    <description>&lt;P&gt;Ho can I convert&amp;nbsp; 2017-09-28 (Numeric, E8601da. format) into a character 8601 format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems I just cant ever get the hang on formats and informats. Somebody please help.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 20:48:41 GMT</pubDate>
    <dc:creator>VinnyR</dc:creator>
    <dc:date>2017-09-28T20:48:41Z</dc:date>
    <item>
      <title>Format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399631#M96809</link>
      <description>&lt;P&gt;Ho can I convert&amp;nbsp; 2017-09-28 (Numeric, E8601da. format) into a character 8601 format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems I just cant ever get the hang on formats and informats. Somebody please help.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 20:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399631#M96809</guid>
      <dc:creator>VinnyR</dc:creator>
      <dc:date>2017-09-28T20:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399641#M96814</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
format new_date1 yymmdd10.;
date='2017-09-28';
new_date1=input(date,yymmdd10.); /* SAS numberic date format- better approach */
new_date=put(input(date,yymmdd10.),mmddyy10.); /* character format */
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is this what you are looking for? Your question is not clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 21:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399641#M96814</guid>
      <dc:creator>PBsas</dc:creator>
      <dc:date>2017-09-28T21:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399660#M96820</link>
      <description>&lt;P&gt;It may help to show what you did and why you weren't satisfied with the result.&lt;/P&gt;
&lt;P&gt;A common issue is people trying to change an existing variable from numeric to character. SAS doesn't do that.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 23:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399660#M96820</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-09-28T23:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399663#M96822</link>
      <description>&lt;P&gt;Should be easy.&amp;nbsp; So you have something like this where your existing variable is an actual date.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  date='28SEP2017'd;
  format date e8601da. ;
  put date= comma7. +1 date e8601da. +1 date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log&lt;/P&gt;
&lt;PRE&gt;date=21,090  2017-09-28 28SEP2017
&lt;/PRE&gt;
&lt;P&gt;And you want to create a new variable that has a string in it that looks like a date.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  set have;
  string = put(date,e8601da.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 23:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399663#M96822</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-09-28T23:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399959#M96902</link>
      <description>Yes. That is true. Whenever, I use put or input I "compress" the variable&lt;BR /&gt;in the bracket. That converts the variable into character and character&lt;BR /&gt;cannot be converted using a numeric format. My mistake, lesson learnt.&lt;BR /&gt;</description>
      <pubDate>Sat, 30 Sep 2017 01:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-problem/m-p/399959#M96902</guid>
      <dc:creator>VinnyR</dc:creator>
      <dc:date>2017-09-30T01:09:35Z</dc:date>
    </item>
  </channel>
</rss>

