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 is SAS? What are the functions does it performs?

1161


what is sas metadata repository? : Sas-bi

1077


Are you involved in writing the inferential analysis plan? Tables specifications?

3915


how to change the execute of macro

2259


what is the basic structure sas administrator? : Sas-administrator

973


what are some differences between proc summary and proc means? : Sas programming

1068


How will you generate test data with no input data?

1129


what is the difference between nodup and nodupkey options? : Sas programming

1140


To what type of programms have you used scratch macros?

2545


how to generate the test data in sas without input data? : Sas-administrator

1079


Are you involved in writing the inferential analysis plan? Tables specfications?

2194


how do the in= variables improve the capability of a merge? : Sas programming

1413


Explain data_null_?

1015


What is the basic syntax of a sas program?

1169


how do you test for missing values? : Sas programming

1021