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 / kavitha

DATA D1;
INPUT SLNO DATE DATE9. ;
DATALINES;
1 12DEC08
2 22NOV08
3 01JAN08
4 12FEB07
5 13MAR07
6 24APR06
7 17MAY06
8 20JUN05
9 29JUL05
10 30APR09
;
RUN;

proc format ;
value KAVI low-'31DEC2006'd='***ddmonyy***'
'01JAN2007'd-'31DEC2007'd='***dd mon ccyy***'
'01JAN2008'd-high=' **Disco Years **';
RUN;

proc print data=D2 noobs label;
format DATE KAVI.;
RUN;

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the functions which are used for character handling functions?

1148


What does the trace option do?

1117


For what purposes have you used sas macros? : sas-macro

1003


How would you identify a macro variable? : sas-macro

1026


what is data integration? : Sas-di

1126


how to remove duplicates using proc sql?

1155


What do the PUT and INPUT functions do?

1345


Describe the function and utility of the most difficult SAS macro that you have written?

2572


Mention what is the difference between nodupkey and nodup options?

1028


what is business intelligence? : Sas-bi

1072


is data integration and etl programming is same? : Sas-di

1088


how many display types available in sas bi dashboard? : Sas-bi

1089


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

2108


How to create list output for cross-tabulations in proc freq?

1116


Explain the difference between using drop = data set option in set and data statement?

1161