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.

Answers were Sorted based on User's Feedback



Hi, I have one dataset like id date ex: id date 1 13 1 13Oct2011 2 14 ..

Answer / ramesh

data inter3;
input id 1-2 dat ;
cards;
1 13
2 14
3 15
;
run;

data inter4;
set inter3;
format dat1 date9.;
dat1=dat;
run;

Is This Answer Correct ?    0 Yes 0 No

Hi, I have one dataset like id date ex: id date 1 13 1 13Oct2011 2 14 ..

Answer / naveen

proc sql;
select *
from qqq
format date date9.;
quit;

Is This Answer Correct ?    0 Yes 0 No

Hi, I have one dataset like id date ex: id date 1 13 1 13Oct2011 2 14 ..

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

Hi, I have one dataset like id date ex: id date 1 13 1 13Oct2011 2 14 ..

Answer / kiran

data dsn;
input id date;
format date date9.;
cards;
1 13
2 14
3 15
;
run;

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More SAS Interview Questions

what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

0 Answers  


what is conditional processing?

4 Answers   Accenture,


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

0 Answers  


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

0 Answers  


What is the order of evaluation of the following operators + - * / ** () ???

2 Answers  






What are the efficacy variables in your study?

2 Answers   Accenture, Quintiles,


Hi , which book should i refer to for preaparing SAS statistical Exam. Searched a lot on books but still did n't find relevant books

2 Answers  


Can we use where and having clauses in a single SAS program. ex: proc sql;     select a,b,c from test      where state in 'KA'      and having <some condition>. Is the above program run correctly, if not why ?     

4 Answers   UHG,


6) Explain about below automatic variables a) _N_ b) _ERROR_ c) _CHAR_ d) _NUMERIC_ e) _ALL_ f) FIRST.BY VARIABLE g) LAST.BY VARIABLE h) _NAME_ i) _TYPE_ j) _FREQ_ k) _STAT_ l) _BREAK

1 Answers   IBM, SAS,


What do the mod and int function do? : Sas programming

0 Answers  


What is univariate n where it can be used n how...?

2 Answers  


What are the advantages of using sas?

0 Answers  


Categories