troubleshooting Question

How do I calculate the number of weekdays between two date fields - excluding weekends?

Avatar of car701015
car701015 asked on
Lotus IBM
13 Comments1 Solution401 ViewsLast Modified:
Hello Experts

I am trying to use the below code in a hidden field...

diffDays := (date_resolved - date_created) / 86400 + 1;
strtDay := @Modulo(@Weekday(date_created); 7);
endDay := @Modulo(@Weekday(date_resolved); 7);
result := (diffDays - endDay + strtDay - 8) * 5 / 7 - @Max(-2; -strtDay) - @Min(1; endDay) + 5 - strtDay + endDay;""

but I get nothing? Anything wrong I did?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros