Saturday 15 February 2014

SAS MACRO FROM PROC SQL DATE ERROR -



SAS MACRO FROM PROC SQL DATE ERROR -

hello trying set specific date dataset macro can utilize in info step , 01-jan-1960 insteed of date want code next one:

proc sql noprint ; select week_start :week_start date_table fw= 5; quit; %let start=&week_start; %let today= today();

i made can see date want:

info temp; date =&today; date1= &start; format date date1 date11.; run;

and result is:

date : 06-oct-2014 date1 : 01-jan-1960

proc sql noprint ; select today()-1 week_start :week_start maps.africa; quit; %let start=&week_start; %let today= today(); info temp; date =&today; date1= &start; format date date1 date11.; run;

when run this, both populate correctly.

additionally, value of date1 in illustration date value numeric value of 0. looks original info beingness populated incorrectly.

sas proc

No comments:

Post a Comment