Hi, I have one dataset like
id date ex: id date
1 13 1 13Oct2011
2 14 2 14Oct2011
3 15 3 15Oct2011 --->this is the current date
here i want date format like 13Oct2011,14Oct2011 how we can
modify the numeric to date format plz answer.
Answer Posted / alok karan
proc format ;
invalue newinformat 13="13oct2011"d 14="14oct2011"d 15="15oct2011"d;
run;
data ii;
input id date:newinformat.;
datalines;
1 13
2 14
3 15
;
run;
proc print data=ii;
format date date9.;
run;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
explain the main difference between the nodup and nodupkey options? : Sas-administrator
which features do you use to check the data validations and errors? : Sas-administrator
Name validation tools used in SAS
explain about data integrator metadata reports? : Sas-di
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro
What are the ways in which macro variables can be created in sas programming?
Difference between sum function and using “+” operator?
describe about physical data integration? : Sas-di
what is change analysis in sas di ? : Sas-di
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
How necessary is it to be creative in your work?
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.
What is the maximum and minimum length of macro variable
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
What are the features of SAS?