<?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 month date conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83907#M288807</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 imported a Stata dataset to SAS. Everything looks correct except for the month variable. I have a month date variable in Stata dataset. It looks like this way, 1991m1, 1991m2, 1991m3,.... When I imported this variable into SAS, It changes to 372, 373, 374.... I wonder how I can correctly convert this variable into a date variable such as 1JAN1991, 1FEB1991,.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jul 2013 22:56:15 GMT</pubDate>
    <dc:creator>SeanZ</dc:creator>
    <dc:date>2013-07-18T22:56:15Z</dc:date>
    <item>
      <title>month date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83907#M288807</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 imported a Stata dataset to SAS. Everything looks correct except for the month variable. I have a month date variable in Stata dataset. It looks like this way, 1991m1, 1991m2, 1991m3,.... When I imported this variable into SAS, It changes to 372, 373, 374.... I wonder how I can correctly convert this variable into a date variable such as 1JAN1991, 1FEB1991,.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 22:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83907#M288807</guid>
      <dc:creator>SeanZ</dc:creator>
      <dc:date>2013-07-18T22:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: month date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83908#M288808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like its counting months from January 1, 1960. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example below shows how to convert it to a SAS date called test and then display as month or date (variable=test2). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; &lt;SPAN style="color: #0433ff;"&gt;input&lt;/SPAN&gt; num_months;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;cards&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;373&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;374&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;375&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;set&lt;/SPAN&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;test=intnx(&lt;SPAN style="color: #942193;"&gt;'month'&lt;/SPAN&gt;, &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;'01Jan1960'd&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="font-family: 'Courier New'; font-size: 16px;"&gt;num_months&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;format&lt;/SPAN&gt; test &lt;SPAN style="color: #009193;"&gt;date9.&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;test2=test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;format&lt;/SPAN&gt; test2 &lt;SPAN style="color: #009193;"&gt;yymm7.&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 00:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83908#M288808</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-19T00:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: month date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83909#M288809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 05:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/month-date-conversion/m-p/83909#M288809</guid>
      <dc:creator>SeanZ</dc:creator>
      <dc:date>2013-07-19T05:17:01Z</dc:date>
    </item>
  </channel>
</rss>

