DATA Step, Macro, Functions and more

hi i/p date is 05sep2005; I want to produce o/p: 05sep2005:00:00:00 ; what is the code?

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

hi i/p date is 05sep2005; I want to produce o/p: 05sep2005:00:00:00 ; what is the code?

Hi Guys,

i/p date is  05sep2005;  I want to produce o/p:  05sep2005:00:00:00 ; what is the code?

Thanks in advance,

John


Accepted Solutions
Solution
‎01-14-2012 01:00 AM
Respected Advisor
Posts: 4,173

hi i/p date is 05sep2005; I want to produce o/p: 05sep2005:00:00:00 ; what is the code?

data have;
  Date='05sep2005'd;
  DateTime=dhms(Date,0,0,0);
  put DateTime datetime21.;
run;

View solution in original post


All Replies
Solution
‎01-14-2012 01:00 AM
Respected Advisor
Posts: 4,173

hi i/p date is 05sep2005; I want to produce o/p: 05sep2005:00:00:00 ; what is the code?

data have;
  Date='05sep2005'd;
  DateTime=dhms(Date,0,0,0);
  put DateTime datetime21.;
run;

Contributor
Posts: 35

hi i/p date is 05sep2005; I want to produce o/p: 05sep2005:00:00:00 ; what is the code?

Thanks Patrick.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 125 views
  • 0 likes
  • 2 in conversation