hi i date is 05sep2005; i want the oupput like
05sep2005:00:00:00 ; how it wil come?
Answers were Sorted based on User's Feedback
data date1;
Date='05sep2005'd;
DateTime=dhms(Date,0,0,0);
put DateTime datetime21.;
format datetime datetime21. date date9.;
run;
second method;
data asd1;
date='05sep2005';
time='00.00.00';
datetime=date||':'||time;
run;
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / siva
date is 05sep2005 but kenny rock taken date as 05sep2005:00:00:00. he is correct if we have date as 05sep2005:00:00:00. what will be code if date is only 05sep2005.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / kenny rock
data test_date;
input date;
informat date datetime18;
cards;
05sep2005:00:00:00
run;
proc print data=test_date;
format date datetime18.;
run;
Is This Answer Correct ? | 14 Yes | 10 No |
Answer / shakeer
data dt;
informat d date9.;
d= '05sep2005'd;
dt=dhms(d,0,0,0);
format dt datetime21.;
proc print;run;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / lavanya
data date;
input date datetime18.;
format date datetime20.;
cards;
05sep2005:00:00:00
run;
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / kumar
data test;
input dt : datetime20.;
cards;
05sep2005:00:00:00
;
proc print data=test;
format dt datetime20.;
run;
Is This Answer Correct ? | 3 Yes | 8 No |
If reading a variable length file with fixed input, how would you prevent SAS from reading the next record if the last variable didn’t have a value?
Which is the best place to learn SAS clinicals and Oracle clinical in hyderabad?
What are symget and symput? : sas-macro
In PROC PRINT, can you print only variables that begin with the letter “A”?
what is the difference between proc means and proc tabulate?
what is the formula to measure Baseline
How do you add a number to a macro variable?
Describe the ways in which you can create macro variables?
what is star schema? : Sas-di
What are MIs reports? what is the use of MIS reports and How can u generate the MIS reports in SAS? If any body know explain with the eg.
2 Answers ABC, ASD Lab, CitiGroup,
how do i get last 10obs from a dataset when we don't know about the number of obsevations in that dataset?
do you prefer proc report or proc tabulate? Why? : Sas programming