hi i date is 05sep2005; i want the oupput like
05sep2005:00:00:00 ; how it wil come?
Answer Posted / muthyam reddy
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 |
Post New Answer View All Answers
What is the difference between nodupkey and nodup options?
explain the proc in sas? : Sas-administrator
How do you control the number of observations and/or variables read or written?
Give some examples where proc report’s defaults are same as proc print’s defaults?
If you could design your ideal job, what would it look like?
Difference between sum function and using “+” operator?
what is the Population you used in your project, is it ITT or PP?
what is sas metadata repository? : Sas-bi
Name and describe few sas character functions that are used for data cleaning in brief.
how to read the variables in sas? : Sas-administrator
How you can read the variables that you need?
How do dates work in sas?
Tell me more about the parameters in macro? : sas-macro
what are the best practices to process the large data sets in sas programming? : Sas-administrator
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5