Help using Base SAS procedures

SAS dates

Reply
Super Contributor
Posts: 279

SAS dates

i'm reading an external csv file that has dates such 6/1/2011 and 12/30/2011. I want to convert them to numeric format. not sure what function or informat to use
Super Contributor
Posts: 326

Re: SAS dates

Hi Gregg,

try using mmddyy10. on your input statement;

input date : mmddyy10.

Hope this helps.

Regards,
Milton
Trusted Advisor
Posts: 2,115

Re: SAS dates

ANYDTDTE. is also very flexible for reading dates that may be in different styles.
New Contributor
Posts: 4

Re: SAS dates

data temp;
input a $ 1-10;
datalines;
12/02/2001
;
run;

data temp2;
set temp;
c=input(a,mmddyy10.);
format c date9.;
run;
Ask a Question
Discussion stats
  • 3 replies
  • 156 views
  • 0 likes
  • 4 in conversation