Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

There is a field containing a date. It needs to be
displayed in the format
"ddmonyy" if it's before 1975,
"dd mon ccyy" if it's after 1985, and
as 'Disco Years' if it's between 1975 and 1985.
How would you accomplish this in data step code? Using
only PROC FORMAT

Answer Posted / sudheendra reddy & veerend

DATA D1;
INPUT SLNO DATE DATE7.;
DATALINES;
1 12DEC73
2 22NOV71
3 01JAN76
4 12FEB77
5 13MAR83
6 24APR90
7 17MAY99
;
RUN;

proc format ;
value dat low-'31DEC1974'd=[date7.]
'01JAN1975'd-'31DEC1984'd="Disco Years"
'01JAN1985'd-high=[date9.];
RUN;

proc print data=D1 noobs label;
format DATE dat.;
RUN;

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is treatment emergent events and treatment emregent adverse event

2325


how sas deals with business intelligence? : Sas-bi

998


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

2398


What is the purpose of trailing @ and @@? How do you use them?

977


What are the features of SAS?

970


Give some examples where proc report’s defaults are different than proc print’s defaults?

1008


How would you invoke a macro? : sas-macro

1036


describe the interaction table in sas di? : Sas-di

965


what is the effect of the options statement errors=1? : Sas programming

1000


what are the scrubbing procedures in sas? : Sas programming

1221


explain the key concept of sas? : Sas-administrator

940


how will you locate the sas platform applications? : Sas-bi

978


What are the statements that are executed only?

1092


In proc transpose and data step with arrays which one you pick?

3039


Tell me more about the parameters in macro? : sas-macro

1008