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



hi i date is 05sep2005; i want the oupput like 05sep2005:00:00:00 ; how it wil come?..

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

hi i date is 05sep2005; i want the oupput like 05sep2005:00:00:00 ; how it wil come?..

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

hi i date is 05sep2005; i want the oupput like 05sep2005:00:00:00 ; how it wil come?..

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

hi i date is 05sep2005; i want the oupput like 05sep2005:00:00:00 ; how it wil come?..

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

hi i date is 05sep2005; i want the oupput like 05sep2005:00:00:00 ; how it wil come?..

Answer / lavanya

data date;
input date datetime18.;
format date datetime20.;
cards;
05sep2005:00:00:00
run;

Is This Answer Correct ?    0 Yes 2 No

hi i date is 05sep2005; i want the oupput like 05sep2005:00:00:00 ; how it wil come?..

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

Post New Answer

More SAS Interview Questions

There is a river notoriously known for it?s large crocodile population. With ease, how do you safely cross it?

1 Answers   Oracle,


Approximately what date is represented by SAS date value of 730

9 Answers  


Difference between SAS STATA & SPSS?

0 Answers  


How would you code the criteria to restrict the output to be produced?

9 Answers  


Difference between sum function and using “+” operator?

0 Answers  






please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

0 Answers  


what is Business Intelligence?

3 Answers   CitiGroup,


How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro

0 Answers  


What versions of SAS have you used (on which platforms)?

0 Answers   Quintiles,


What is interleaving in SAS?

0 Answers  


For clinical entire study how many tables will create approx?

0 Answers   TCS,


How do you specify the number of iterations and specific condition within a single do loop?

0 Answers  


Categories