Hi
I would like to get the following values into SAS VA using elapsed time formatting:
However, I am getting this results within SAS VA:
Is it possible to get the time values as shown on the 1st screenshot?
Regards
What is the source of the elapsed times?
Are you getting it from outside SAS? If it's from outside SAS (Excel for example), the representation can be different and a conversion is necessary. Again using Excel as an example, Excel bases everything off of Jan 1, 1900. SAS, on the other hand, bases everything off of Jan 1, 1960. Excel date-times will appear to be far in the future in SAS if not converted.
Inside SAS, normally one just subtracts the ending date-time value from the starting date-time value. I typically use the format TIME13.2 with elapsed times.
As an example:
%LET Start_Datetime = %SYSFUNC(INPUTN('07sep2018:23:00:00'dt, DATETIME18.));
%LET End_DateTime = %SYSFUNC(INPUTN('08sep2018:01:00:00'dt, DATETIME18.));
%PUT %SYSFUNC(COMPRESS(%SYSFUNC(PUTN(%SYSEVALF(&End_DateTime - &Start_DateTime), TIME13.2))));
Results in:
2:00:00.00
Indicating that 2 hours, 0 minutes, and 0 seconds have elapsed.
Jim
Just to rule something out-- I know the column name is "Average time to completion", but can you check that the aggregation on the column is set to Average?
Thanks,
Sam
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.