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 (June 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 Jun 2000 19:13:13 -0500
Reply-To:     O J Nwoha <nwohaj@SPECTRE.AG.UIUC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         O J Nwoha <nwohaj@SPECTRE.AG.UIUC.EDU>
Subject:      Re: Converting Months to Year
Comments: To: Roger Barnes <Roger_Barnes@oz.sas.com>
In-Reply-To:  <2E8ACB34A778D311940400805F6500CDD651B8@wallaby.oz.sas.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII

Thanks Roger:

It worked.

On Wed, 7 Jun 2000, Roger Barnes wrote:

> Date: Wed, 7 Jun 2000 09:51:09 +1000 > From: Roger Barnes <Roger_Barnes@oz.sas.com> > To: 'O J Nwoha' <nwohaj@spectre.ag.uiuc.edu>, SAS-L@LISTSERV.UGA.EDU > Subject: RE: Converting Months to Year > > This should do it: > > data tmp; > do time=1 to 48; > year=int((time-1)/12)+1; /* this is the line you need > */ > output; > end; > run; > > proc print data=tmp; > run; > > > -----Original Message----- > > From: O J Nwoha [mailto:nwohaj@SPECTRE.AG.UIUC.EDU] > > Sent: Wednesday, 7 June 2000 9:46 AM > > To: SAS-L@LISTSERV.UGA.EDU > > Subject: Converting Months to Year > > > > > > Dear Saslers: > > > > I have one variable named TIME that runs from 1 to 48. > > I would like to convert to years where such that when time is 1 to 12, > > year is 1. When time is 37 to 48 year is 4. > > > > Thanks in advance for your usual help. > >


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