i want to display the date next to the column name on the report. can;t get the firday date from %let = %sysfunc(weekday("&sysdate"d));
&todaydate1. = 10/21/2019
proc report data=sh1.week_sch
STYLE(Header)={background=lightgreen foreground=black}
style(column)={background=White foreground=black}
style(report)={width=10in};
column Support_Type Friday_order Saturday_order Sunday_order Monday_order;
define Support_Type / display ' Schedule';
define Friday_order / display 'Friday' &todaydate1.;
define Saturday_order / display 'Saturday' ;
define Sunday_order / display 'Sunday Support';
define Monday_order / display 'Monday Support';
run;
NOTE: Line generated by the macro variable "TODAYDATE1".
1 10/21/2019
--
22
76
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ;, ACROSS,
ANALYSIS, CENTER, COLOR, COMPUTED, CONTENTS, CSS, CV, DESCENDING, DISPLAY,
EXCLUSIVE, F, FLOW, FORMAT, GROUP, ID, ITEMHELP, LEFT, MAX, MEAN, MEDIAN, MIN,
MISSING, MLF, MODE, N, NMISS, NOPRINT, NOZERO, ORDER, P1, P10, P20, P25, P30,
P40, P5, P50, P60, P70, P75, P80, P90, P95, P99, PAGE, PCTN, PCTSUM, PRELOADFMT,
PROBT, PRT, Q1, Q3, QRANGE, RANGE, RIGHT, SPACING, STD, STDERR, STYLE, SUM,
SUMWGT, T, USS, VAR, WEIGHT, WGT, WIDTH.
ERROR 76-322: Syntax error, statement will be ignored.
Thank you for the help.
%let x= %sysfunc(today(),mmddyy10.); ........... define Friday_order / display "Friday &x ";
column name displays as
Friday 10
21
2019
Or just use a different delimiter when generating the date value.
How to get the friday date of this week? in %sysfunc
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.