<?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: How to group by monname and keep format on export in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91844#M26170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA_NULL_,&lt;/P&gt;&lt;P&gt;Thank you so much for your assistance I was able to make it work...I have never used proc summary before...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Mar 2013 19:22:30 GMT</pubDate>
    <dc:creator>BETO</dc:creator>
    <dc:date>2013-03-29T19:22:30Z</dc:date>
    <item>
      <title>How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91839#M26165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a data step where I'm converting a date/time field into just date and formatting it to monname5. ( I tried monyy5.)&lt;/P&gt;&lt;P&gt;in the second table I would like to group by the month but it seems like even though its a month it still has days same number if it was days.&lt;/P&gt;&lt;P&gt;in addition when I export it out to excel it converts the monname format back to a muddy format ...enclose is a snapshot of the script ...thanks for your assistance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt; DeActive ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;set DeActive ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;DATE=datepart(TranDate);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;FORMAT DATE monyy7.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;CREATE TABLE CCMS AS&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;(SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;Atmcodenumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;AVG(DispCashAmt) As Avg_DispCashAmt ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;AVG(DispCashCnt)As Avg_DispCashCnt ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;Avg(CurrInitAmt) As Avg_Replen,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;Avg(CashAddAmt) As Avg_Cash_Add&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;FROM DeActive&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;group by DATE,Atmcodenumber&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="text-align: left;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 18:10:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91839#M26165</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-03-28T18:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91840#M26166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if GROUP BY uses the formatted value of DATE or the internal value or if you can control it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do know that PROC SUMMARY will use the formatted value of date by default.&amp;nbsp; I prefer SUMMARY/MEANS for decriptive statistics over SQL and the code is usually shorted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the data get to EXCEL you will need to tell EXCEL how you want the date field formatted. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 18:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91840#M26166</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-28T18:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91841#M26167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI can you provide an example ? Thank youThank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 22:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91841#M26167</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-03-28T22:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91842#M26168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is pretty close.&amp;nbsp; It is untested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;summary&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;nway&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;missing&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=deactive;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; date atmcodenumber;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; DispCashAmt DispCashCnt CurrInitAmt CashAddAmt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=ccms &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;mean&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 23:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91842#M26168</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-28T23:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91843#M26169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Formats do not change how the value is stored. they control how the value is displayed.&amp;nbsp; If you want the month name to appear in Excel, try converting it to a character value and pass the character string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;moname = put(date, monname5.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 18:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91843#M26169</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-29T18:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91844#M26170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA_NULL_,&lt;/P&gt;&lt;P&gt;Thank you so much for your assistance I was able to make it work...I have never used proc summary before...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 19:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91844#M26170</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-03-29T19:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by monname and keep format on export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91845#M26171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you&amp;nbsp; pass a date formatted as monname to excel through ods tagsets.excelxp you can get excel to present it as a month name with the excel format "mmmm". If you use "mmm" you get the effect of sas format monname3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 20:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-group-by-monname-and-keep-format-on-export/m-p/91845#M26171</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-03-29T20:40:44Z</dc:date>
    </item>
  </channel>
</rss>

