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


Please Help Members By Posting Answers For Below Questions

Describe the ways in which you can create macro variables? : sas-macro

576


what does the run statement do? : Sas programming

556


How to include or exclude specific variables in a data set?

646


what is the difference between floor and ceil functions in sas? : Sas-administrator

707


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 ...

945






Approximately what date is represented by the SAS date value of 730?

750


How would you identify a macro variable? : sas-macro

534


What is program data vector (pdv)?

635


Mention the category in which sas informats are placed?

627


how many types of prompts are there? : Sas-bi

555


For what purposes have you used sas macros? : sas-macro

540


What is the difference between INPUT and INFILE ?

754


what is sas and what are the functions? : Sas-administrator

542


what are all the reports you generated in your recent project?

1683


If a variable contains only numbers, can it be a character data type?

613