Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get num of days between 2 dates

How can i get the number of days between two dates

without counting the weekend which are Friday and Saturday >>

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can use the networkdays function: networkdays(DateA+1, DateB+1)


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
MK_QSL
MVP
MVP

You need to create a flag in script as

If(WeekDay(Date) = 4 or WeekDay(Date) = 5, 0 , 1) as Flag

and can count the no of working days as SUM(Flag)

Please check enclosed file which may help you.

Gysbert_Wassenaar

You can use the networkdays function: networkdays(DateA+1, DateB+1)


talk is cheap, supply exceeds demand
Not applicable
Author

Many thanks , but didnt get y u add 1 to each??

MK_QSL
MVP
MVP

NetWorkDays(Start,End,Holidays) will give you total number of working days excluding Saturdays and Sundays.

i.e. Monday to Friday working days

Saturday and Sunday WeekEnds


By adding 1 to Start and End Date, we are forcing NetWorkDays to count this calculation by shifting one place.

i.e. Sunday to Thursday working days

Friday and Saturday WeekEnds...

Hope this help..