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 (March 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, 9 Mar 2010 09:35:28 -0500
Reply-To:     Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Subject:      Selecting dates in a period. Was  RE: new joinee
Comments: To: "sasbond1981@gmail.com" <sasbond1981@gmail.com>
In-Reply-To:  <4eee31fa1003090613o414691cs49edbdbc6aa562b8@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

Joinee While I can suspect where the problem lies, could you post (to the group, not just to me) the actual code that you used. That would help a lot. Nat Wooding From: sasbond1981 sasbond1981 [mailto:sasbond1981@gmail.com] Sent: Tuesday, March 09, 2010 9:14 AM To: Nathaniel Wooding (Services - 6) Cc: SAS-L@listserv.uga.edu; SAS-L-request@listserv.uga.edu Subject: Re: new joinee Hi, need suggestion please.. Suppose I have a dataset containing two variables "Start_Date and End_Date" and here I need to create a variable called "period". Here the start and end dates were in Datetime format and I took only datepart by "datepart" function and formated it as date9. And created "Period" variable by giving some logic as " MDY(month(today()),1,year(today()))-1 " which will give value as "FEB2010" (which is Monyy7. format). So now based on this period variable I need to pull only the FEB month data from years of data. Actually the data contains two years (historical) data till last month. example: START_DATE END_DATE PERIOD 01FEB2010 01FEB2010 JAN2010 01FEB2010 02FEB2010 JAN2010 16JUL2009 16JUL2009 JAN2010 19DEC2009 20DEC2009 JAN2010 21JAN2010 22FEB2010 JAN2010 26FEB2010 26FEB2010 JAN2010 30JAN2010 30JAN2010 JAN2010 31DEC2009 31DEC2009 JAN2010 the above is the sample data... now what I need is based on this period I need to pull only Feb dates starting from 01FEB2010 and ending of 31FEB2010. So in simple I want FEB data only. START_DATE is in date9. format END_DATE is in date9. format Period is in Monyy7. format I tried with between and >= and <= and etc etc... but it is not workin for me... please give me ur idea on this... Cheers, CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


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