<?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: Get month from a date format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105668#M29470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The monname format uses a date variable not a month variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so&lt;/P&gt;&lt;P&gt;date_a=date;&lt;/P&gt;&lt;P&gt;format date_a monname10.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;format date monname10.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2012 18:54:37 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-10-24T18:54:37Z</dc:date>
    <item>
      <title>Get month from a date format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105667#M29469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I havea data format as such MMDDYYP10. (samples below), I'm trying to get the months out of the dat but in a MONNAME. format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Have&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;05.02.2012&lt;/P&gt;&lt;P&gt;06.14.2012&lt;/P&gt;&lt;P&gt;07.04.2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used&lt;/P&gt;&lt;P&gt;Date_A = Month (Date);&lt;/P&gt;&lt;P&gt;Format Date_A MONANME.&amp;nbsp; but this didn't quite work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Want&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Date_B&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;May&amp;nbsp; &lt;/P&gt;&lt;P&gt;June&lt;/P&gt;&lt;P&gt;July&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 18:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105667#M29469</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-10-24T18:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get month from a date format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105668#M29470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The monname format uses a date variable not a month variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so&lt;/P&gt;&lt;P&gt;date_a=date;&lt;/P&gt;&lt;P&gt;format date_a monname10.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;format date monname10.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 18:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105668#M29470</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-10-24T18:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get month from a date format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105669#M29471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 19:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105669#M29471</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-10-24T19:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get month from a date format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105670#M29472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza, when I export it to Excel the date_a doesn't come across as only Month , but as the whole date similar to date.&amp;nbsp; In SAS it shows correct, how I would like it to. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 19:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105670#M29472</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-10-24T19:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get month from a date format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105671#M29473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You exported the data with proc export?&lt;/P&gt;&lt;P&gt;By definition SAS does not export formats to Excel using proc export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead you can create a new variable using the put statement that will recode the data and then export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_a=put(date, monname10.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 21:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105671#M29473</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-10-24T21:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get month from a date format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105672#M29474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PROC EXPORT does not keep formats, but the ODS tagsets does.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Below is a sample code that will keep ALL your formats.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods listing close;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods tagsets.excelxp path = &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;"&amp;amp;output_path."&lt;/STRONG&gt; file="&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;amp;data..xml&lt;/STRONG&gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style=analysis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options(absolute_column_width='10,10,8,8,10,10,15,8,15,8,15,10,8,8,8,8,10,10,15,8,15,8,15,10,8,8,8,8,20'&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sheet_label=' ');&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods tagsets.excelxp options(sheet_name="sheetname");&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc print noobs label data = &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;amp;data.;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;your_variables;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods tagsets.excelxp close;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods listing;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 21:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Get-month-from-a-date-format/m-p/105672#M29474</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2012-10-24T21:40:29Z</dc:date>
    </item>
  </channel>
</rss>

