<?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: proc means in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33630#M8140</link>
    <description>The format associated with the analysis variable will also be associated with the statistics, MIN and MAX.&lt;BR /&gt;
&lt;BR /&gt;
RTM</description>
    <pubDate>Sat, 19 Mar 2011 12:19:52 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2011-03-19T12:19:52Z</dc:date>
    <item>
      <title>proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33623#M8133</link>
      <description>Hi can someone please tell me how I can do a PROC MEANS min max on a date value to find the lowest date and the higest date. &lt;BR /&gt;
&lt;BR /&gt;
My code:&lt;BR /&gt;
PROC MEANS DATA = temp.ms_trans MIN MAX;&lt;BR /&gt;
VAR efectv_dt;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
The informat  and format of the variable is DATE9.&lt;BR /&gt;
&lt;BR /&gt;
I am getting &lt;BR /&gt;
&lt;BR /&gt;
                                            CUST_ID           08:54 Thursday, March 17, 2011 217&lt;BR /&gt;
                                                                The MEANS Procedure&lt;BR /&gt;
&lt;BR /&gt;
                             Analysis Variable : EFECTV_DT EFECTV_DT&lt;BR /&gt;
&lt;BR /&gt;
                                       Minimum         Maximum&lt;BR /&gt;
                                  ----------------------------&lt;BR /&gt;
                                      18322.00        18686.00&lt;BR /&gt;
                                  ----------------------------&lt;BR /&gt;
&lt;BR /&gt;
thanks so much for any input.</description>
      <pubDate>Fri, 18 Mar 2011 21:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33623#M8133</guid>
      <dc:creator>yaswoman</dc:creator>
      <dc:date>2011-03-18T21:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33624#M8134</link>
      <description>I don't know how to do it with proc means directly but what about outputting it to a dataset and printing it or using proc sql?&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc means data=temp.ms_trans noprint;&lt;BR /&gt;
var efectv_dt;&lt;BR /&gt;
output out=sample min=min_date max=max_date;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
OR&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
select max(efectv_dt) as max_date, min(efectv_dt) as min_date&lt;BR /&gt;
from temp.ms_trans;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 18 Mar 2011 23:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33624#M8134</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-03-18T23:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33625#M8135</link>
      <description>Thank You so much,  will try that,</description>
      <pubDate>Fri, 18 Mar 2011 23:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33625#M8135</guid>
      <dc:creator>yaswoman</dc:creator>
      <dc:date>2011-03-18T23:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33626#M8136</link>
      <description>It is a friday afternoon...for the sql statement also need a format,&lt;BR /&gt;
format=date9.&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
select max(date) as max_date format =date9., min(date) as min_date format =date9.&lt;BR /&gt;
from sashelp.stocks;&lt;BR /&gt;
quit;</description>
      <pubDate>Sat, 19 Mar 2011 00:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33626#M8136</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-03-19T00:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33627#M8137</link>
      <description>Yes I realized that, so I did add that + an create statement that would let me print.&lt;BR /&gt;
thanks so much for your help.</description>
      <pubDate>Sat, 19 Mar 2011 01:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33627#M8137</guid>
      <dc:creator>yaswoman</dc:creator>
      <dc:date>2011-03-19T01:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33628#M8138</link>
      <description>If you create an output data set with MEANS/SUMMARY the MIN and MAX will inherit the associated format.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
   do date = today() to today()+10;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   format date date9.;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc summary data=test;&lt;BR /&gt;
   var date;&lt;BR /&gt;
   output out=mm min=min max=max;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc contents varnum;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
      Variables in Creation Order&lt;BR /&gt;
&lt;BR /&gt;
#    Variable    Type    Len    Format&lt;BR /&gt;
&lt;BR /&gt;
1    _TYPE_      Num       8&lt;BR /&gt;
2    _FREQ_      Num       8&lt;BR /&gt;
3    min         Num       8    DATE9.&lt;BR /&gt;
4    max         Num       8    DATE9.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Sat, 19 Mar 2011 01:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33628#M8138</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-19T01:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33629#M8139</link>
      <description>Sorry I am not quite sure I understand what exactly that means. &lt;BR /&gt;
the MIN and MAX will inherit the associated format. &lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
      <pubDate>Sat, 19 Mar 2011 03:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33629#M8139</guid>
      <dc:creator>yaswoman</dc:creator>
      <dc:date>2011-03-19T03:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33630#M8140</link>
      <description>The format associated with the analysis variable will also be associated with the statistics, MIN and MAX.&lt;BR /&gt;
&lt;BR /&gt;
RTM</description>
      <pubDate>Sat, 19 Mar 2011 12:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-means/m-p/33630#M8140</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-19T12:19:52Z</dc:date>
    </item>
  </channel>
</rss>

