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

Of all your work, where have you been the most successful?

4621


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

2436


How do you use the do loop if you don’t know how many times you should execute the do loop?

1209


How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

2055


how many types prompting framework can be broken down to? : Sas-bi

1031


What function CATX syntax does?

1164


Can you execute macro within another macro? : sas-macro

935


How will you generate test data with no input data?

1104


I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2655


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

1850


How to create a permanent sas data set?

1136


what is the one statement to set the criteria of data that can be coded in any step? : Sas programming

1089


What would be the value of month at the end of data step execution and how many observations would be there?

1059


What is the maximum length of the macro variable? : sas-macro

1044


How would you invoke a macro? : sas-macro

1041