BookmarkSubscribeRSS Feed
Kamohelo
Fluorite | Level 6

Hi 

 

I would like to get the following values into SAS VA using elapsed time formatting:

Kamohelo_0-1628678731597.png

 

However, I am getting this results within SAS VA:

 

Kamohelo_1-1628678847148.png

 

Is it possible to get the time values as shown on the 1st screenshot?

 

Regards

2 REPLIES 2
jimbarbour
Meteorite | Level 14

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

Sam_SAS
SAS Employee

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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 2 replies
  • 1162 views
  • 0 likes
  • 3 in conversation