From: Nathaniel Wooding on 9 Mar 2010 09:35 Joinee=0D=0A=0D=0AWhile I can suspect where the problem lies, could you pos= t (to the group, not just to me) the actual code that you used=2E That woul= d help a lot=2E=0D=0A=0D=0ANat Wooding=0D=0A=0D=0AFrom: sasbond1981 sasbond= 1981 [mailto:sasbond1981(a)gmail=2Ecom]=0D=0ASent: Tuesday, March 09, 2010 9:= 14 AM=0D=0ATo: Nathaniel Wooding (Services - 6)=0D=0ACc: SAS-L(a)listserv=2Eu= ga=2Eedu; SAS-L-request(a)listserv=2Euga=2Eedu=0D=0ASubject: Re: new joinee= =0D=0A=0D=0AHi,=0D=0A=0D=0Aneed suggestion please=2E=2E=0D=0A=0D=0ASuppose = I have a dataset containing two variables "Start_Date and End_Date" and her= e I need to create a variable called "period"=2E=0D=0A=0D=0AHere the start = and end dates were in Datetime format and I took only datepart by "datepart= " function and formated it as date9=2E And created "Period" variable by giv= ing some logic as=0D=0A=0D=0A" MDY(month(today()),1,year(today()))-1 "=0D= =0A=0D=0Awhich will give value as "FEB2010" (which is Monyy7=2E format)=2E = So now based on this period variable I need to pull only the FEB month data= from years of data=2E=0D=0A=0D=0AActually the data contains two years (his= torical) data till last month=2E=0D=0A=0D=0Aexample:=0D=0A=0D=0ASTART_DATE = END_DATE PERIOD=0D=0A01FEB2010 01FEB2010 JAN2010= =0D=0A01FEB2010 02FEB2010 JAN2010=0D=0A16JUL2009 1= 6JUL2009 JAN2010=0D=0A19DEC2009 20DEC2009 JAN2010=0D=0A2= 1JAN2010 22FEB2010 JAN2010=0D=0A26FEB2010 26FEB2010= JAN2010=0D=0A30JAN2010 30JAN2010 JAN2010=0D=0A31DEC2009 = 31DEC2009 JAN2010=0D=0A=0D=0Athe above is the sample data=2E= =2E=2E now what I need is based on this period I need to pull only Feb date= s starting from 01FEB2010 and ending of 31FEB2010=2E So in simple I want FE= B data only=2E=0D=0A=0D=0ASTART_DATE is in date9=2E format=0D=0AEND_DATE is= in date9=2E format=0D=0APeriod is in Monyy7=2E format=0D=0A=0D=0AI tried w= ith between and >=3D and <=3D and etc etc=2E=2E=2E but it is not workin for= me=2E=2E=2E please give me ur idea on this=2E=2E=2E=0D=0A=0D=0A=0D=0ACheer= s,=0D=0A=0D=0A=0D=0A=0D=0A=0D=0ACONFIDENTIALITY NOTICE: This electronic me= ssage contains=0Ainformation which may be legally confidential and or privi= leged and=0Adoes not in any case represent a firm ENERGY COMMODITY bid or o= ffer=0Arelating thereto which binds the sender without an additional=0Aexpr= ess written confirmation to that effect=2E The information is=0Aintended s= olely for the individual or entity named above and access=0Aby anyone else = is unauthorized=2E If you are not the intended=0Arecipient, any disclosure= , copying, distribution, or use of the=0Acontents of this information is pr= ohibited and may be unlawful=2E If=0Ayou have received this electronic tra= nsmission in error, please=0Areply immediately to the sender that you have = received the message=0Ain error, and delete it=2E Thank you=2E
|
Pages: 1 Prev: Jim and MMMMIIIIKKKKEEEE Next: Selecting dates in a period. Was RE: new joinee |