Hello,
I want to show a datetime variable as two seperate columns for date and time using proc report. This can be done quite simply by adding another datastep before I do the proc report but this is too inefficient for large datasets.
Here is the code I have:
proc report data=shona.oos nowindows ;
column jtmdtid date time2 ;
define date/computed format=date9. "Date";
define time2/computed format=time8. "Time";
define jtmdtid/display "";
compute date;
date=datepart(jtmdtid);
endcomp;
compute time2;
time2=timepart(jtmdtid);
endcomp;
run;
But the problem is the compute blocks won't work unless I have variable jtmdtid in the column part. If I do that then the datetime variable is displayed in the report. I either a completely different way of converting datetime to date and time or else a way of hiding a variable that is specified as a column.
Any help is much appreciated.