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
its
between 1975 and 1985. How would you accomplish this in
data step code? Using only PROC FORMAT.

Answer Posted / kamalan

proc format;
value datestyl low-'31dec1974'd = [date7.]
'01jan1975'd - '31dec1985'd = 'disco Years'
'01jan1986'd - max = [date9.] ;
Run;

proc print data = abc;
format dateval datestyl.;
Run;

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1080


What are the data types does SAS contain?

1054


what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming

1080


Give e an example of..

2038


Explain what is the use of proc gplot?

1126


what is sas and what are the functions? : Sas-administrator

933


Where do you use proc means over proc freq?

1054


How do you use the do loop if you don’t know how many times you should execute the do loop?

1215


what is sas metadata server? : Sas-di

1051


Mention what is PROC in SAS?

1012


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

1106


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

1006


What is the work of tranwrd function?

1181


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

2404


what are the component of range? : Sas-bi

1021