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 (December 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Dec 2011 13:16:38 -0500
Reply-To:     Stanley Luo <shanminglo@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Stanley Luo <shanminglo@GMAIL.COM>
Subject:      Lookup tables

Dear SAS-Ls: I have following 2 questions: 1.How do I convert date to "quarter" format? for example, 2011/7/4 converts to "2011Q3", 2011/10/10 to "2011Q4" since i got lots of "quarters".

2.Follow Question 1, I have two datasets,

dataset A: obs Area start_date evaluate_date 1 tp 2003Q2 2007Q3 2 ks 2001Q1 2004Q4 . . .

dataset B: obs tp ks 2001Q1 109.19 109.63 2001Q2 112.52 115.13 2001Q3 116.33 118.55 2001Q4 118.86 115.99 . . .

I need A to lookup B which desired result is as below: obs Area start_date evaluate_date start_rate evaluate_rare 1 tp 2003Q2 2007Q3 115.99 120.06 2 ks 2001Q1 2004Q4 109.63 110.89

How do I make it happen?? Thanks in advace!!!


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