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
its
between 1975 and 1985. How would you accomplish this in
data step code? Using only PROC FORMAT.

Answer Posted / j. sheetal

Here is the correction in above example,
proc format;
value datestyl low-'31dec1974'd = [date7.]
'01jan1975'd - '31dec1985'd = 'disco Years'
'01jan1986'd - high = [date9.] ;
Run;

Example:

data k1;
input date2 $9.;
cards;
31dec1974
01jan1975
01jan1985
01jan1990
;

data temp;
set k1;
date1=input(date2,date9.);
sam = date1;
format sam datestyl.;
run;

proc print;
run;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

1879


How do you specify the number of iterations and specific condition within a single do loop?

1102


What are the features of base sas system?

1063


what is change analysis in sas di ? : Sas-di

1058


why a stop statement is needed for the point= option on a set statement?

1075


What can be the size of largest dataset in SAS?

1225


Which function is used to count the number of intervals between two sas dates?

1127


Difference between SAS STATA & SPSS?

1114


What are pdv and it functions?

1139


how do you want missing values handled? : Sas programming

955


what is information maps?

2219


what other sas products have you used and consider yourself proficient in using? : Sas programming

1110


What is the basic structure of the SAS base program?

1322


How can you create a macro variable with in data step? : sas-macro

1038


explain what is factor analysis? : Sas-administrator

1112