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 different types of sas functions?

1365


explain about data integrator metadata reports? : Sas-di

1170


Explain what Proc glm does?

1300


What are the difference between ceil and floor functions in sas?

1406


what is the difference between unique key and primary key? : Sas-di

1180


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

1062


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

1139


What are the applications primarily used by business analyst? : Sas-bi

1053


what is metadata? : Sas-bi

1078


Explain proc univariate?

1108


What is slibref?

1335


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1660


In sas admin differentiate between roles and capabilities? : sas-grid-administration

1053


what is the purpose of _error_? : Sas programming

1191


What are the difference between sas functions and procedures?

1203