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
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,
windays = INTCK('days',winstart,winend);
Hope this helps!
> -----Original Message-----
> From: Eduard Streltsov [SMTP:firstname.lastname@example.org]
> Sent: Friday, February 09, 2001 1:15 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Frequency by season
> 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 !!!