count day in two date

Good afternoon, I would like to calculate the duration in days of two dates, excluding Saturday and Sunday.

I have two field:
example: Request Date start: 7/03/2023 and Request Date finish: 13/03/2023

the duration(type number) should be 5 days, but return 7

ABS(HOUR([Request Date start]- [Request Date finish]) / 24)

have you solutions?

thanks

0 3 181
3 REPLIES 3

Uk
Silver 1
Silver 1
TOTALHOURS(
  WORKDAY(
    [Request Date finish],
    -1 * (WEEKDAY([Request Date finish]) - 2),
    [Request Date start]
  ) - [Request Date start]
) / 24

thanks for response

i receved "WORKDAY has invalid inputs. Parameter [Request Date start] has to be LIST type"

Could you please explain the steps you have taken in 

 
TOTALHOURS(
WORKDAY(
[Request Date finish],
-1 * (WEEKDAY([Request Date finish]) - 2),
[Request Date start]
) - [Request Date start]
) / 24

Top Labels in this Space