Reputation: 67
My data set has one variable whose values is like MMMYYYY format. But it is in character.
I have used input function to convert it to numeric but it didnt work. code i have used is
newdate=input(chardate, date9.);
but is is not working. Please suggest me whats wrong in this code.
Thanks, Ravi
Upvotes: 0
Views: 28
Reputation: 21264
You date isn't in a Date9 format, it's in the MONYY INFORMAT
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199690.htm
newdate=input(chardate, monyy7.);
Upvotes: 1