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

What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

1124


What are the difference between the sas data step and sas procs?

1135


How do you define proc in sas? : sas-grid-administration

1056


What is the role of unrestrictive users? : sas-grid-administration

986


how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

1299


what is operational data and operational system? : Sas-di

1082


What is the use of stop statement?

1036


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

1125


name the scheduler for scheduling job and explain the scheduler? : Sas-di

1022


How we can call macros with in data step? : sas-macro

1086


What is the use of divide function?

1030


What do you know about symput and symget?

1186


do you need to know if there are any missing values? : Sas programming

1012


What are the features of base sas system?

1041


What is the difference between order and group variable in proc report?

1395