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 / paul

proc format ;
value dat low-'31DEC1974'd=[date7.]
'01JAN1975'd-'31DEC1985'd="Disco Years"
'01JAN1986'd-high=[date9.];
run;

proc sql;
select date format=dat. from D1 ;
quit;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1044


What is the use of divide function?

1008


how to do user inputs and command line arguments in sas?

2974


what r the job openings SAS for fresher graduates !

2391


What does PROC print, and PROC contents do?

1168


Explain the use of proc print and proc contents?

905


What are symget and symput? : sas-macro

1240


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3529


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

2163


What is the basic syntax style in SAS?

1093


If a variable contains letters or special characters, can it be numeric data type?

1159


How to include or exclude specific variables in a data set?

1062


what are the benefits of data integration? : Sas-di

1022


name some data transformation used in sas di? : Sas-di

911


What are common programming errors committed in sas

1097