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 are the new features included in the new version of SAS Programming Language?

1210


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

1075


What are the different operating system platforms in which we can use sas? : sas-grid-administration

1073


What are the limitations for memory allocation for SAS variables

1494


what is sas business intelligence? : Sas-bi

1183


Difference between nodup and nodupkey options?

1195


What are the statements in proc sql?

1105


what can you learn from the sas log when debugging? : Sas programming

1089


how can you create zero observation dataset? : Sas programming

1149


How necessary is it to be creative in your work?

2476


How sas treats the dsd delimiters?

1216


Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com

2029


how can you put a "trace" in your program? : Sas programming

1066


what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

1022


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

1079