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
Describe the ways in which you can create macro variables? : sas-macro
what does the run statement do? : Sas programming
How to include or exclude specific variables in a data set?
what is the difference between floor and ceil functions in sas? : Sas-administrator
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
Approximately what date is represented by the SAS date value of 730?
How would you identify a macro variable? : sas-macro
What is program data vector (pdv)?
Mention the category in which sas informats are placed?
how many types of prompts are there? : Sas-bi
For what purposes have you used sas macros? : sas-macro
What is the difference between INPUT and INFILE ?
what is sas and what are the functions? : Sas-administrator
what are all the reports you generated in your recent project?
If a variable contains only numbers, can it be a character data type?