LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 6 Apr 1997 08:17:13 +1200
Reply-To:     Tom Robinson <Tom.Robinson@ACTRIX.GEN.NZ>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Tom Robinson <Tom.Robinson@ACTRIX.GEN.NZ>
Organization: Actrix Networks Limited
Subject:      Re: Summation by month

In article <5htlnb$5s2$5@news2.voicenet.com>, donaldc@voicenet.com (Christopher W. Donald) wrote:

>This may be an elementary question, but I am trying to figure out >another more efficient manner to do calculate totals by month. > >Assume data looking like > >data foo; > input >Trandate mmddyy8. >widgets >datalines; >05/01/97 10 >05/07/97 11 >06/03/97 12 >06/30/97 1; > >To sum by month I would create mon1=month(Trandate) >yea1 = year(Trandate);

Nah, just do:

proc summary missing nway; class trandate; format trandate monyy7.; var widgets; output out=work.summary sum=; run; -- 8 Bare Customer: "I'm running Windows '95." o-+-o Foot Tech Support: "Yes." < > Guru Customer: "My computer isn't working now." Tech Support: "Yes, you said that."


Back to: Top of message | Previous page | Main SAS-L page