I'm almost brand new to both sas and sql - hopefully this is easy!
I've got an effective date field coming from a mainframe data file. It was created in mainframe sas as a character field. Value is yymmdd. I want to convert this to a sas date format to use the various date functions for summing by data by year, quarter, etc...
So far I've tried:
proc sql;
create table datet as
select
input (effdate, yymmddw.) AS date,
input (effdate, yymmddw.) as datef format=date9.
from cd.wcfile (firstobs = 1 obs = 10)
;
quit;
example is input file has character 030514 for May 14, 2003 - but output is date=30514 datef=18JUL2043.
Thanks in advance to anyone who can help!!
Lora
I've got an effective date field coming from a mainframe data file. It was created in mainframe sas as a character field. Value is yymmdd. I want to convert this to a sas date format to use the various date functions for summing by data by year, quarter, etc...
So far I've tried:
proc sql;
create table datet as
select
input (effdate, yymmddw.) AS date,
input (effdate, yymmddw.) as datef format=date9.
from cd.wcfile (firstobs = 1 obs = 10)
;
quit;
example is input file has character 030514 for May 14, 2003 - but output is date=30514 datef=18JUL2043.
Thanks in advance to anyone who can help!!
Lora