cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Difference between two dates by excluding Weekends

ptc-6083798
1-Visitor

Difference between two dates by excluding Weekends

I need the Difference between two dates by excluding Weekends.

I used "weekdaysDiff" function its is failing when I gave First and Last date as Weekend Dates .

or when I gave any one value as Weekend.

Thanks

ACCEPTED SOLUTION

Accepted Solutions

Years ago I had written a trigger script for MKS/PTC that did that and posted it in the "Fields Developped Objects" database. Ask PTC support to send you "calculateField.js".

What this means, of course, is that you must use a trigger and cannot use a field computation. Are you sure it's the weekdaysDiff function that fails and not somewhere else in your formula? You may want to post it and have other eyes look at it.

View solution in original post

1 REPLY 1

Years ago I had written a trigger script for MKS/PTC that did that and posted it in the "Fields Developped Objects" database. Ask PTC support to send you "calculateField.js".

What this means, of course, is that you must use a trigger and cannot use a field computation. Are you sure it's the weekdaysDiff function that fails and not somewhere else in your formula? You may want to post it and have other eyes look at it.

Announcements


Top Tags