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 program data vector (pdv)?

1192


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

2280


how do you test for missing values? : Sas programming

1001


what is function of retain statment

1978


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

1155


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

1104


Which command is used to save logs in the external file?

1031


which date functions advances a date time or date/time value by a given interval? : Sas programming

905


Tell me about % include and % eval? : sas-macro

1099


What is the difference between input and infile statement?

1116


What do you code to create a macro? : sas-macro

1067


What are the five ways to do a table lookup in sas? : sas-grid-administration

995


what does the run statement do? : Sas programming

993


What are the ways in which macro variables can be created in sas programming?

1032


what are validation tools that are used in sas? : Sas-administrator

1004