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 2024

Innovate_SAS_Blue.png

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. 

Register now!

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