Hallo
I'm dealing with a problem I hope you guys can help me with.
I have a date var which is located as a character variable.
Date = '2010-07-12 12:20:51'
I want to convert it into a sas date with time registrated. Probably on the format datetime16.
How can I do that?
Thanks for the help.
Kind regard Frank.
numdate = input(chardate,e8601dt19.); format numdate e8601dt19.;
The e8601dt informat will do the conversion. Personally, I prefer formats with a ymdhms order.
View solution in original post
Thank you KurtBremser it worked fine!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.