BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
allurai0412
Fluorite | Level 6

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 ?


reportss.jpg
1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

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." ;

View solution in original post

2 REPLIES 2
art297
Opal | Level 21

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." ;

allurai0412
Fluorite | Level 6

thanks Mr Arthur

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 398 views
  • 0 likes
  • 2 in conversation