DATA Step, Macro, Functions and more

Help in dates

Accepted Solution Solved
Reply
Contributor
Posts: 70
Accepted Solution

Help in dates

How to convert the below date
01DEC2016:00:00:00 to this format mm/dd/yyy?

Trying to create a new variable, getting blank

Data a;
Format newDate mmddyy10.;
Set a;
newDate=input(newdata mmddyy10);
run;

 

 

Thanks


Accepted Solutions
Solution
‎09-15-2017 10:27 AM
Super User
Posts: 5,441

Re: Help in dates

Posted in reply to Kalai2008

Is the current timestamp in numerical SAS date time variable?

If, so, use datepart() function, then just assign your format of choice.

Data never sleeps

View solution in original post


All Replies
Solution
‎09-15-2017 10:27 AM
Super User
Posts: 5,441

Re: Help in dates

Posted in reply to Kalai2008

Is the current timestamp in numerical SAS date time variable?

If, so, use datepart() function, then just assign your format of choice.

Data never sleeps
☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 141 views
  • 0 likes
  • 2 in conversation