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

Difference between SAS STATA & SPSS?

1119


What are the features of base sas system?

1068


If you could design your ideal job, what would it look like?

2931


what are informats in sas? : Sas-administrator

1093


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

1089


Describe a time when you were really stuck on a problem and how you solved it?

2637


What are the new features included in the new version of SAS Programming Language?

1209


describe about metadata object? : Sas-di

1071


How to specify variables to be processed by the freq procedure?

1075


Approximately what date is represented by the SAS date value of 730?

1217


What does PROC print, and PROC contents do?

1238


Differences between where and if statement?

1092


what are _numeric_ and _character_ and what do they do? : Sas programming

1156


Explain how you can debug and test your SAS program?

1013


Tell e how how dealt with..

2253