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

data new ;
input date ddmmyy10. ;
cards;
01/05/1955
01/09/1970
01/12/1975
19/10/1979
25/10/1982
10/10/1988
27/12/1991
;
run;

proc format ;

value dat low-'01jan1975'd=ddmmyy10.
'01jan1975'd-'01JAN1985'd="Disco Years"
'01JAN1985'd-high=date9.;
run;

proc print;
run;

proc print;
format date dat. ;
run;

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you determine the number of missing or nonmissing values in computations?

1078


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

1076


Explain what is data step?

1211


what is function of retain statment

2047


how does sas handle missing values in formats? : Sas programming

1151


How to sort in descending order?

1268


Mention what is the difference between nodupkey and nodup options?

1030


how does sas handle missing values in assignment statements? : Sas programming

1030


What is the use of %include statement?

1070


for whom is sas data integration studio designed? : Sas-di

1014


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

2110


what is snowflake schema? : Sas-di

1223


why is sas considered self-documenting? : Sas programming

1156


why a stop statement is needed for the point= option on a set statement?

1091


Difference between SAS STATA & SPSS?

1131