Obsidian | Level 7

## calculate a delay between to date without the weekend

Hello, I know that i can use INTCK on studio but i want to know if i can find a formula in visual Analytics to measure the delay between 2 dates and exclude the week end or blank days.

6 REPLIES 6
Super User

## Re: calculate a delay between to date without the weekend

What would a "blank day" be? Never heard that term before.

The INTCK and INTNX functions will use the WEEKDAY as an interval.

Example:

```data example;
day1='05APR2024'd;
day2='09APR2024'd;
weekdaysbetween = intck('weekday',day1,day2);
run;```

Day1 is a Friday, Day2 is Tuesday. Weekdaysbetween is 2.

Obsidian | Level 7

## Re: calculate a delay between to date without the weekend

thanks 🙂

It's a french word. It's a a day where our company don't work like esater or christmas. I already use intck in sas studio but i want tu find a solution on visual analytics with the existing formula

Obsidian | Level 7

## Re: calculate a delay between to date without the weekend

A parralel Question. INTCK is perfect with weekday but it take the saturday and sunday.

When i put the table on WORK, I can use INTCK("WEEKDAY1W",(DATEPART(Date1)),(DATEPART(date2))) and it works and it only remove the sunday. But when i change and i work on CAS. It's KO.

Is it normal?

Obsidian | Level 7

## Re: calculate a delay between to date without the weekend

I know that a can use INTCK on a program or on a flow. But my data table is already here. I want to calculate a delay in days between two date without the saturday ou sunday for example. Only working days.

But i need or want to know if we can do it by using only Calculated items (and formula) in visual analytics.

Opal | Level 21

## Re: calculate a delay between to date without the weekend

Using intck() for an interval Monday-Friday won't be hard but if you also want to exclude holidays then you need a Custom Time Interval. Not sure if and how this works with in-memory tables and VA.

Obsidian | Level 7

## Re: calculate a delay between to date without the weekend

Not Clearly. My target is to do the same thing as INTCK but by using Existing formula.

Discussion stats
• 6 replies
• 590 views
• 0 likes
• 3 in conversation