<?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: converting date part in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13625#M2033</link>
    <description>I suspect the errors you are getting are format doesn't exist.&lt;BR /&gt;
&lt;BR /&gt;
Is EFFDAT numeric and currently displayed with a MMDDYY10. format or is it actually text? The resolution is very dependent on the answer.&lt;BR /&gt;
&lt;BR /&gt;
The final format you want is probably YYMMDDN8. if you do not want any delimiter in the final display, instead of CCYYMMDD. SAS date display formats doe not use a century component per se.</description>
    <pubDate>Tue, 14 Jun 2011 22:36:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2011-06-14T22:36:06Z</dc:date>
    <item>
      <title>converting date part</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13623#M2031</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I need to convert the date part (effdate field) from MMDDYYYY to CCYYMMDD.&lt;BR /&gt;
&lt;BR /&gt;
The current sample data \&lt;BR /&gt;
 ID   Name Effdat&lt;BR /&gt;
 001 David   05/01/2003&lt;BR /&gt;
 002 bob     04/01/1997&lt;BR /&gt;
 003 ben     08/09/2011&lt;BR /&gt;
&lt;BR /&gt;
I tried like this,&lt;BR /&gt;
&lt;BR /&gt;
Proc sql;&lt;BR /&gt;
Create table test as &lt;BR /&gt;
Select ID, name, INPUT (effdat, CCYYMMDD.) format=CCYYMMDD.  From table1;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
I am getting an error.&lt;BR /&gt;
&lt;BR /&gt;
Can anyone please help me to resolve this issue.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in Adavance.</description>
      <pubDate>Tue, 14 Jun 2011 19:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13623#M2031</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-06-14T19:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: converting date part</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13624#M2032</link>
      <description>Need to know the exact error - which determines what type of SAS variable (CHAR or NUMERIC) is being referenced when attempting the INPUT function with effdat (or effdate - whatever).&lt;BR /&gt;
&lt;BR /&gt;
Also, for clarification about "CC", please provide an example of what you expect the value to be for a given calendar year?&lt;BR /&gt;
&lt;BR /&gt;
There are various SAS formats (using PUT, not INPUT, depending on the source variable format CHAR or NUMERIC) that may convert your DATE variable properly.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 14 Jun 2011 19:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13624#M2032</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-14T19:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: converting date part</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13625#M2033</link>
      <description>I suspect the errors you are getting are format doesn't exist.&lt;BR /&gt;
&lt;BR /&gt;
Is EFFDAT numeric and currently displayed with a MMDDYY10. format or is it actually text? The resolution is very dependent on the answer.&lt;BR /&gt;
&lt;BR /&gt;
The final format you want is probably YYMMDDN8. if you do not want any delimiter in the final display, instead of CCYYMMDD. SAS date display formats doe not use a century component per se.</description>
      <pubDate>Tue, 14 Jun 2011 22:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/converting-date-part/m-p/13625#M2033</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-06-14T22:36:06Z</dc:date>
    </item>
  </channel>
</rss>

