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
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.