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 / amit gupta

proc sql;
select
case when date lt '31DEC2006'd then date end as mydate
format=date7. from d1
case when date gt '31DEC2008'd then date end as mydate
format=date9. ,
case when '01JAN2007'd <= date <= '31DEC2008'd then 'DUMMY'
end as mydate
from d1 ;
quit;


Just that these are in three different columns;

Tried the above resolutions but unsuccessfully.

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 maximum number of rows and cols can be handled in SAS?

1516


Mention few capabilities of sas framework.

1148


Differentiate input and infile.

1066


Describe the function and untility of the most difficult SAS macro that you have written.

2170


Explain proc sort?

1042


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1873


what is data governance? : Sas-di

989


What are the implications?

1649


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

1412


WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?

2758


how can you import .csv file in to sas? : Sas programming

1065


for what purpose would you use the retain statement? : Sas programming

1045


What is a method to debug and test your SAS program?

1304


How to read an input file in sas?

1109


what is sas and what are the functions? : Sas-administrator

947