BookmarkSubscribeRSS Feed
Karsten_Jakobse
Returning User | Level 2

data grund;
format proces_start proces_slut datetime23.2;
proces_start = '23APR2019:11:30:19.400'dt;
proces_slut = '30APR2019:08:09:11.300'dt;
brutto_time_diff_sek = proces_slut-proces_start;
run;
 
/* This table only contains working days */
data kalender;
format begin datetime23.2;
begin='17APR2019:00:00:00.000'dt;
output;
begin='23APR2019:00:00:00.000'dt;
output;
begin='24APR2019:00:00:00.000'dt;
output;
begin='25APR2019:00:00:00.000'dt;
output;
begin='26APR2019:00:00:00.000'dt;
output;
begin='29APR2019:00:00:00.000'dt;
output;
begin='30APR2019:00:00:00.000'dt;
output;
begin='01MAY2019:00:00:00.000'dt;
output;
run;
 
OPTIONS INTERVALDS=(XKALENDER=KALENDER);
 
/*I expect the result to be 419.400 sec.*/
 
PROC SQL;
CREATE TABLE resultat AS SELECT *
,INTCK('XKALENDER', PROCES_START, PROCES_SLUT) AS PROCES_NETTO_SEK format=commax18.2
,INTCK('XKALENDER', PROCES_START, PROCES_SLUT)*86400 AS PROCES_NETTO_SEK1
FROM grund;
quit;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Discussion stats
  • 0 replies
  • 436 views
  • 0 likes
  • 1 in conversation