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

proc sql;
create table fmtdate(keep=newdate) as
select date,
case
when date lt '31DEC1974'd then put(date,date7.)
when date gt '31DEC1984'd then put(date,date9.)
else 'Desco Year'
end as newdate
from d1;
quit;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what other sas products have you used and consider yourself proficient in using? : Sas programming

1162


how to change the execute of macro

2379


what do the mod and int function do? What do the pad and dim functions do? : Sas programming

1223


What is the difference between match merge and one to one merge?

1311


What is SAS?

1097


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

2394


what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

2227


what is slowly changing dimension? : Sas-di

1183


What are the advantages of using sas?

1189


What can you learn from the SAS log when debugging?

1434


Give an example where SAS fails to convert character value to numeric value automatically?

1132


How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro

1098


What function CATX syntax does?

1256


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

1059


what r the job openings SAS for fresher graduates !

2500