hi,
i am working some date functions ..but diff b.n the dates is showing some else in the column "days of delay"
the out put i.e report is attached in word document ...please let me what is the wrong with date function i used ?
please help.
regards
ALLU
the code is....................................
proc import dataFILE='C:\Users\galax_allu\Desktop\br1.csV' dbms=csv out=allu.br2 replace ;
run;
data allu.br3 ;
set allu.br2 ;
format date1 ddmmyy10.;
informat date1 ddmmyy10.;
run;
%let t1=%sysfunc(today(),ddmmyy10.);
%PUT &T1;
proc report data=allu.br3 nowd headskip;
column brnum brname region (regname) bankname brokamt sheme date1 tt;
title "Allu and co sub-borker company";
title "Report for the day" &t1 ;
define brnum / 'brokerage number';
define brname / 'broker name' width =6;
define region/ DISPLAY 'region' ;
define regname / GROUP 'Region Belongs to' WIDTH=32;
define brokamt / analysis 'brokamt';
define sheme / 'SCHEME' STYLE=[FOREGROUND=YELLOW];
define date1/ display 'Date of Invoice';
define tt/ 'Days of delay' ;
BREAK AFTER REGNAME / SUMMARIZE ;
COMPUTE AFTER REGNAME;
REGNAME= TRIM(REGNAME)||' TOTAL ' ;
ENDCOMP;
compute tt ;
tt=intck(days,today(),date1);
endcomp;
COMPUTE SHEME;
IF SHEME="LP" THEN CALL DEFINE (_row_,'STYLE','STYLE=[FOREGROUND=RED]');
ENDCOMP;
compute after _page_ / style={bordertopcolor=black bordertopwidth=2};
line ' ';
endcomp;
RUN;
the out put i.e report is attached in word document ...please let me what is the wrong with date function i used ?
Couple of possibilities.
First, in your use of the intck function, put quotes around days. i.e.:
tt=intck('days',today(),date1);
Your title also has a problem. Move the macro variable to within the quotes. i.e.:
title "Report for the day &t1." ;
Couple of possibilities.
First, in your use of the intck function, put quotes around days. i.e.:
tt=intck('days',today(),date1);
Your title also has a problem. Move the macro variable to within the quotes. i.e.:
title "Report for the day &t1." ;
thanks Mr Arthur
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.