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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 426 views
  • 0 likes
  • 2 in conversation