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 (January 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 12 Jan 2010 11:41:59 -0800
Reply-To:   hd <heenagd@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   hd <heenagd@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   data manipulation
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

HI,

I am a bit stuck on this problem.

I have a dataset of dates sorted

1.01/02/2006 2.01/03/2006 3.01/04/2006 4.01/07/2006 5.01/08/2006 6.02/01/2006 7.02/02/2006 8.02/08/2006 9.02/09/2006

I would like to create a dataset

where I have the dates above and the corresponding previous date. Also I wwould like to create a number column for each month corresponding to the date column that resets at a new month

So something like

date prevdate number 01/02/2006 1 01/03/2006 01/02/2006 2 01/04/2006 01/03/2006 3 01/07/2006 01/04/2006 4 01/08/2006 01/07/2006 5 02/01/2006 01/08/2006 1 02/02/2006 02/01/2006 2 02/08/2006 02/02/2006 3 02/09/2006 02/08/2006 4

Many many thanks for your help


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