<?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 Year and Month in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43825#M11485</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 a requirement where I need to populate a field with year and month.&lt;/P&gt;&lt;P&gt;eg: 201201&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2012 23:37:26 GMT</pubDate>
    <dc:creator>renjithr</dc:creator>
    <dc:date>2012-03-26T23:37:26Z</dc:date>
    <item>
      <title>Year and Month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43825#M11485</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 a requirement where I need to populate a field with year and month.&lt;/P&gt;&lt;P&gt;eg: 201201&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 23:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43825#M11485</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2012-03-26T23:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Year and Month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43826#M11486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'populate a field with year and month' from what??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose that your source is date variable. Although you can concatenate all the way to your target, proc format seems to have an edge:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt; picture my_yearmon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; low-high='%Y%0m'(datatype=date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;format a date9.;&lt;/P&gt;&lt;P&gt;a=date();&lt;/P&gt;&lt;P&gt;b=put(a,my_yearmon6.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 23:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43826#M11486</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-03-26T23:57:06Z</dc:date>
    </item>
    <item>
      <title>Year and Month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43827#M11487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Hai.kuo!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 00:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43827#M11487</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2012-03-27T00:17:44Z</dc:date>
    </item>
    <item>
      <title>Year and Month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43828#M11488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The YYMMN6. format should do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 02:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43828#M11488</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2012-03-27T02:04:54Z</dc:date>
    </item>
    <item>
      <title>Year and Month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43829#M11489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing! Yes, It does work! It is strange I can't find the doc, I could only locate it as informat, but not format from 9.2 online docs:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000363557.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000363557.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 02:11:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Year-and-Month/m-p/43829#M11489</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-03-27T02:11:33Z</dc:date>
    </item>
  </channel>
</rss>

