Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can i get the number of days between two dates
without counting the weekend which are Friday and Saturday >>
You can use the networkdays function: networkdays(DateA+1, DateB+1)
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.
You can use the networkdays function: networkdays(DateA+1, DateB+1)
Many thanks , but didnt get y u add 1 to each??
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..