Hello, Arju1.
I understood you want to create a needle graph with date time in xaxis. If I was right, I'd create a datetime variable (date_time) with a data step.
data msudatax;
set msudatax;
date_time=dhms(date,0,0,time);
run;
and then I'd change proc sgplot for this one:
proc sgplot data = work.msudatax ;
needle x=date_time y=FreeMSU;
format date_time datetime14. ;
xaxis type= discrete display=(nolabel) fitpolicy=SPLIT splitchar=':';
run;
This graph would be display
I attach the full code.
data work.msudatax;
infile datalines delimiter=',' missover firstobs=1 DSD;
input Date :ddmmyy10. Time:time. FreeMSU;
datalines;
14/11/2020,7:02:00.000,24
14/11/2020,7:07:00.000,24
14/11/2020,7:12:00.000,25
14/11/2020,7:17:00.000,-9
14/11/2020,7:22:00.000,23
15/11/2020,6:57:00.000,46
15/11/2020,7:02:00.000,48
15/11/2020,7:07:00.000,146
15/11/2020,7:12:00.000,146
15/11/2020,7:17:00.000,147
;
run;
data msudatax;
set msudatax;
date_time=dhms(date,0,0,time);
run;
proc Contents data=work.msudatax;
run;
ods excel file="\temp.xlsx" options(sheet_name="gugus.xls");
proc print data=work.msudatax (drop=date_time) noobs;
title "MSU Report";
ods excel options(sheet_interval = 'proc' sheet_name = "MSU");
ods graphics / reset width = 6.4in height=4.8in imagemap;
proc sgplot data = work.msudatax ;
needle x=date_time y=FreeMSU;
format date_time datetime14. ;
xaxis type= discrete display=(nolabel) fitpolicy=SPLIT splitchar=':';
run;
ods graphics / reset;
ods excel close;
... View more