<?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 how do I read date and month to create SAS data set in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27997#M6474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Tom / Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. This solve my problem. program working like charm,,,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2011 13:42:41 GMT</pubDate>
    <dc:creator>tom16</dc:creator>
    <dc:date>2011-10-21T13:42:41Z</dc:date>
    <item>
      <title>how do I read date and month to create SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27994#M6471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have .csv file with 3 million records to create sas data set.&lt;/P&gt;&lt;P&gt;In this file date values are mention as following: only year and month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1999MAY&lt;/P&gt;&lt;P&gt;2001JAN&lt;/P&gt;&lt;P&gt;2002FEB&lt;/P&gt;&lt;P&gt;1979DEC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I read this YYYYMMM date value to create SAS data set with mmddyyyy format as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;05-01-1999&lt;/P&gt;&lt;P&gt;01-01-2001&lt;/P&gt;&lt;P&gt;02-01-2002&lt;/P&gt;&lt;P&gt;12-01-1979&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 00:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27994#M6471</guid>
      <dc:creator>tom16</dc:creator>
      <dc:date>2011-10-12T00:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: how do I read date and month to create SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27995#M6472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand your question correctly, I think the following describes your data and a possible solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1999MAY&lt;/P&gt;&lt;P&gt;2001JAN&lt;/P&gt;&lt;P&gt;2002FEB&lt;/P&gt;&lt;P&gt;1979DEC&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want(drop=indate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; format date mmddyy10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(date=indate));&lt;/P&gt;&lt;P&gt;&amp;nbsp; date=input(indate||"01",anydtdte19.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 01:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27995#M6472</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-12T01:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: how do I read date and month to create SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27996#M6473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to read as a string and switch the year and month position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input cdate $7.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; date = input(substr(cdate,5,3)||cdate,monyy7.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; format date mmddyy10.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put date ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cards; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1999MAY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;2001JAN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;2002FEB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1979DEC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;05/01/1999&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;01/01/2001&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;02/01/2002&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;12/01/1979&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 01:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27996#M6473</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-10-12T01:04:53Z</dc:date>
    </item>
    <item>
      <title>how do I read date and month to create SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27997#M6474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Tom / Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. This solve my problem. program working like charm,,,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 13:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-do-I-read-date-and-month-to-create-SAS-data-set/m-p/27997#M6474</guid>
      <dc:creator>tom16</dc:creator>
      <dc:date>2011-10-21T13:42:41Z</dc:date>
    </item>
  </channel>
</rss>

