09-25-2016 05:07 PM
I am working on on SQL Server Database, with a low date as 0001-01-01, While reading this data into SAS these values are shown a nulls or ***** can any one of you please help on this. One millions thanks well in advance.
09-25-2016 10:00 PM
*** usually because length of format is too short, try assign a longer format Like format date date9. Or remove that format and see what is going on in it . proc print ; format date;
09-26-2016 02:48 AM
I have already tried this. This did not work.
My problem here any date prior to 1958-01-01 is reading as missing. How can I resolve this.
That would be very strange, as SAS accepts dates back to the 16th century:
dateval = input(datestring,yymmdd10.); format dateval yymmddd10.; cards; 1960-01-01 1958-01-01 1850-01-01 1750-01-01 1690-01-01 1590-01-01 ; run; proc print; run;
Obs datestring dateval 1 1960-01-01 1960-01-01 2 1958-01-01 1958-01-01 3 1850-01-01 1850-01-01 4 1750-01-01 1750-01-01 5 1690-01-01 1690-01-01 6 1590-01-01 1590-01-01
09-26-2016 10:42 AM
Since I doubt that you have any actual values recorded for 0001-01-01 I suspect that exact value is being used as either a place holder or indicator for missing or invalid data. Due to vagaries of history and inconsistent calendars SAS does not support dates prior to the English adoption of the Gregorian calendar.
Also if you are looking at OUTPUT in Excel by any chance, Excel doesn't support dates prior to 1900.