I was trying to run the following program found in SAS help:
data projects;
options nodate pageno=1 linesize=80 pagesize=60;
input Projid startdate date9. enddate date9.;
Duration=enddate-startdate;
datalines;
398 17oct1997 02nov1997
942 22jan1998 10mar1998
167 15dec1999 15feb2000
250 04jan2001 11jan2001
;
proc print data=projects;
format startdate enddate date9.;
title 'Days Between Project Start and Project End';
run;
But in my output the enddates are:
02nov2001
10mar2001
15feb2002
11jan2002
It seems that the system picked up the right day and month but not the year. And this only happens to the variable enddate but not the startdate.
Can someone help me to figure out why this is happening?
Thanks!
... View more