The today() function works well in the sql code as well as the datastep, i tried myself check the below code proc sql; create table want as select Calendar_Day,order_status,fee, sum(no) as sum from have group by Calendar_Day,order_status,fee; insert into want set Calendar_Day=today(),Order_Status='start',fee='free'; quit; Also, data want; set have end=eof; output; if eof then do; Calendar_Day=today(); Order_Status='start'; fee='free'; no=.; output; end; run; Also, you can use &sysdate9. to get the today date, it is a macro variable for today date. I used it proc sql; create table want as select Calendar_Day,order_status,fee, sum(no) as sum from have group by Calendar_Day,order_status,fee; insert into want set Calendar_Day="&sysdate9."d,Order_Status='start',fee='free'; quit; Thanks, Jagadish
... View more