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

data formated(keep=datenew);
length datenew $10.;
set new;
if date<'31dec1974'd then datenew=put(date,date7.);
else if date>'31dec1984'd then datenew=put(date,date7.);
else datenew='Disco Year';
run;
proc print data=formated nobs;run;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between format and informat? : sas-grid-administration

1065


How to create a permanent sas data set?

1245


name several ways to achieve efficiency in your program? : Sas programming

1075


What is the function of Stop statement in a SAS Program?

1155


How will you use the WHO Drug Dictionary for Reporting Clinical Trials?

2340


How do you specify the number of iterations and specific condition within a single do loop?

1109


how many types prompting framework can be broken down to? : Sas-bi

1077


what is the effect of the options statement errors=1? : Sas programming

1064


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

2071


: and & modifiers.

1398


What is the function of output statement in a SAS Program?

1075


What do the put and input function do?

1067


What is the differnce between SDTM 3.1.2 to 3.1.1 version

5077


what is function of retain statment

2041


Explain how you can debug and test your SAS program?

1016