ravi teja pandilla
ravi teja pandilla

Reputation: 67

Reading SAS date values

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

Answers (1)

Reeza
Reeza

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

Related Questions