LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Feb 2001 13:30:08 -0500
Reply-To:     "Shilling, Brian [PRI]" <BShillin@PRIUS.JNJ.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Shilling, Brian [PRI]" <BShillin@PRIUS.JNJ.COM>
Subject:      Re: Frequency by season
Comments: To: "estreltsov@eurocomix.net" <estreltsov@eurocomix.net>
Content-Type: multipart/alternative;

Ed,

Try this.

Set up to variables for each season, one beginning and one end. For this example, lets use winter.

winstart = 01FEB2000; winend = 28FEB2001;

then use the INTCK function to figure out the number of days in the season, like so:

windays = INTCK('days',winstart,winend);

Hope this helps!

Brian

> -----Original Message----- > From: Eduard Streltsov [SMTP:estreltsov@eurocomix.net] > Sent: Friday, February 09, 2001 1:15 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Frequency by season > > Hi, > > I've got a SAS file DATES with a variable DATE which is a SAS date. The > values of DATE span several years across the observations. I also have > four seasons defined as: > > winter -> 01dec thru feb > spring -> 01mar thru may > summer -> 01jun thru aug > autumn -> 01sep thru nov > > What I have to do is print number of dates that fall into each season > (frequency by season) like this: > > winter=123 spring=456 summer=789 autumn=258 > > If a season has nothing in it, a missing (.) should print. I've come up > with a pretty ugly pile of if-then-elses. I will appreciate any > professional, elegant example of how to do it. > > Thanks, Ed > > _____________________________________________________________ > Get you @eurocomix.net at http://eurocomix.com for FREE !!!


[text/html]


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